Skip to content
This repository has been archived by the owner on May 3, 2019. It is now read-only.

Error on scraping followers #7

Open
Thicool opened this issue Jun 29, 2017 · 9 comments
Open

Error on scraping followers #7

Thicool opened this issue Jun 29, 2017 · 9 comments

Comments

@Thicool
Copy link

Thicool commented Jun 29, 2017

Works fine but scraping followers gives me:

Scraping followers...
Traceback (most recent call last):
File "instagramcrawler.py", line 302, in
caption='None')
File "instagramcrawler.py", line 96, in crawl
self.scrape_followers_or_following(crawl_type, query, number)
File "instagramcrawler.py", line 214, in scrape_followers_or_following
title = self._driver.find_element_by_xpath(FOLLOW_PATH)
File "...\selenium\webdriver\remote\webdriver.py", line 313, in find_element_by_xpath
return self.find_element(by=By.XPATH, value=xpath)
File "...\selenium\webdriver\remote\webdriver.py", line 791, in find_element
'value': value})['value']
File "...\selenium\webdriver\remote\webdriver.py", line 256, in execute
self.error_handler.check_response(response)
File "...\selenium\webdriver\remote\errorhandler.py", line 194, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: //div[contains(text(), 'Followers')]

Any idea? Thanks for your help.

@tzuhsial
Copy link
Owner

Can you give me more information & environment on your query?
(E.g. the command you used to crawl followers)
Thanks!

@Thicool
Copy link
Author

Thicool commented Jun 30, 2017 via email

@tzuhsial
Copy link
Owner

tzuhsial commented Jul 3, 2017

@Thicool
Did you login your instagram account?
(The webdriver will open up the browser for you to login)

@Thicool
Copy link
Author

Thicool commented Jul 3, 2017 via email

@tzuhsial
Copy link
Owner

tzuhsial commented Jul 3, 2017

@Thicool
I think its because after clicking on the element,
my code only waits for 1 second before scrolling the followers list
I'll fix and push it later

Antonie

@tzuhsial
Copy link
Owner

tzuhsial commented Jul 3, 2017

@Thicool
Pushed, please check if you have time...
And also, thanks for notifying!

Regards,
Antonie Lin

@Thicool
Copy link
Author

Thicool commented Jul 4, 2017

Thanks for your work, but the problem still exists in my case. I Attached Error Message and Gecklog.

Hope that helps!

error.txt
geckodriver.txt

@tzuhsial
Copy link
Owner

tzuhsial commented Jul 7, 2017

@Thicool
It works for me when crawling followers/ following at the moment
The only solution I know have is to set the timeout value a bit larger(make it wait a little longer)...

@mrpatricque
Copy link

mrpatricque commented Jan 17, 2018

Hi there! I am encountering the same issue here! How can I set the timeout value a bit larger? I can crawl for photos, but get the same error for followers/following. When crawling photos, there is no login done, and when I include crawling reactions, I get a different, more complicated error. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants