redianmarku / instagram-follower-scraper

A python script that can automatically scrape other people followers on instagram and save them in a txt file.
256 stars 88 forks source link

stopped working #8

Open mediopolis opened 2 years ago

mediopolis commented 2 years ago

I now get an error when trying to run the script.

[Info] - Logging in... Traceback (most recent call last): File "C:\Users\mediopolis\Desktop\scraper\run.py", line 103, in scrape() File "C:\Users\mediopolis\Desktop\scraper\run.py", line 69, in scrape WebDriverWait(bot, TIMEOUT).until( File "C:\Users\mediopolis\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\support\wait.py", line 80, in until raise TimeoutException(message, screen, stacktrace) selenium.common.exceptions.TimeoutException: Message

mediopolis commented 2 years ago

fixed. just needed to update the XPATH

ghost commented 2 years ago

fixed. just needed to update the XPATH

Could you share new path?

ardanazz commented 2 years ago

new xPath (if your IG is in another language, you should replace 'followers' with 'followersInYourLanguage'):

WebDriverWait(bot, TIMEOUT).until(EC.presence_of_element_located((By.XPATH, '//a[contains(.,"followers")]'))).click()

ardanazz commented 2 years ago

//a[contains(.,'followers')]

Also need to change followers variable to:

 followers = bot.find_elements_by_xpath( '//*/div[@role="button"]/a')
newdispatcher commented 2 years ago

it worked but it didn't scrap followers & no entry in followers.txt. please help!!!

newdispatcher commented 2 years ago

fixed. just needed to update the XPATH

how you updated the Xpath?

ardanazz commented 2 years ago

fixed. just needed to update the XPATH

how you updated the Xpath?

see last 2 comments, just need to edit run.py with a text editor like notepad, sublime text, etc.

newdispatcher commented 2 years ago

After your edits it worked!!! Thanks

hellofaizan commented 2 years ago

can you please retype the entire line in next comment please @ardanazz

hellofaizan commented 2 years ago

//a[contains(.,'followers')]

Also need to change followers variable to:

 followers = bot.find_elements_by_xpath( '//*/div[@role="button"]/a')

Please ReWrite the entire line another time. I cant understand your previous comments

frodas20 commented 2 years ago

fixed. just needed to update the XPATH

how you updated the Xpath?

see last 2 comments, just need to edit run.py with a text editor like notepad, sublime text, etc.

I edited it and said it scraped but when i look at my followers.txt there's nothing? can someone help me out?

Arctic25 commented 2 years ago

Hi, I changed the xPath as suggested, but it NOT working, the "follower.txt" file is empty. Here the code changed, could you please chek if it correct @mofaizanfdns, @ardanazz:

WebDriverWait(bot, TIMEOUT).until( EC.presence_of_element_located(( By.XPATH, '//a[contains(.,"followers")]'))).click()

Thanks in advance