Open mediopolis opened 2 years ago
fixed. just needed to update the XPATH
fixed. just needed to update the XPATH
Could you share new path?
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()
//a[contains(.,'followers')]
Also need to change followers variable to:
followers = bot.find_elements_by_xpath( '//*/div[@role="button"]/a')
it worked but it didn't scrap followers & no entry in followers.txt. please help!!!
fixed. just needed to update the XPATH
how you updated the Xpath?
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.
After your edits it worked!!! Thanks
can you please retype the entire line in next comment please @ardanazz
//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
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?
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
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