Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting detected if any linkedin url called #12

Closed
arnavsaxena17 opened this issue Jun 10, 2020 · 3 comments
Closed

Getting detected if any linkedin url called #12

arnavsaxena17 opened this issue Jun 10, 2020 · 3 comments
Labels
update-documentation Todo: update documentation

Comments

@arnavsaxena17
Copy link

arnavsaxena17 commented Jun 10, 2020

Hi,

I am able to load up undetected-chromedriver and it shows undetected initially.
When I call any linkedin person profile. Eg. https://www.linkedin.com/in/arnavsaxena/
Immediately after calling it, the webdriver gets detected and it fails.
OS : MacOS Sierra 10.12.6
Chrome Version : 83.0
Could you please help explain this?


import undetected_chromedriver as uc
chromedriver_path = '/Users/arnavsaxena/Downloads/chromedriver'
uc.install(executable_path=chromedriver_path)
from selenium import webdriver

options = webdriver.ChromeOptions()
# opts.add_argument(f'--proxy-server=socks5://127.0.0.1:9050')

options.add_argument("user-data-dir=/Users/arnavsaxena/Library/Application Support/Google/Chrome/Profile 1/Default") #Path to your chrome profile
driver = webdriver.Chrome(chrome_options=options)
test_site = 'https://www.linkedin.com/in/arnavsaxena/'

driver.get('https://bot.sannysoft.com')
# driver.get(test_site)

Screen Shot 2020-06-10 at 1 53 49 PM
Screen Shot 2020-06-10 at 1 54 24 PM

@ultrafunkamsterdam
Copy link
Owner

Dear @arnavsaxena17

I checked linkedin and i'm able to navigate and move my way perfectly fine.

Please try below code since it worked for me, even login and search are working fine. Are you sure you did everything programmatically and not just clicked or typed url's yourself in the browser window?

import undetected_chromedriver as uc
driver = uc.Chrome()

driver.get('https://www.linkedin.com')
driver.find_element_by_link_text('Sign in').click()
driver.find_element_by_id('username').send_keys('########')
driver.find_element_by_id('password').send_keys('########')
driver.find_element_by_css_selector('button').click()

driver.save_screenshot('linkedin.png')

driver.switch_to.default_content()
driver.find_element_by_css_selector(
    '.search-global-typeahead__input.always-show-placeholder').send_keys('chromedriver\n')

driver.save_screenshot('linkedin_search.png')

image
image

@arnavsaxena17
Copy link
Author

I think the fail happens if bot detection is checked for a new tab. For a certain duration, it continues to remain undetected in the first tab.

@ultrafunkamsterdam
Copy link
Owner

That could be possible, however no claims are made about supporting of multiple tabs. The anti-detection mechanism is not working at first load, but only from
the first navigation away onwards. So the initial empty start page on launch plays a big role here..and usually is not the behaviour when opening new tabs (these usually initialize directly to a given url)

@ultrafunkamsterdam ultrafunkamsterdam added the update-documentation Todo: update documentation label Jun 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
update-documentation Todo: update documentation
Projects
None yet
Development

No branches or pull requests

2 participants