pinterest-image-scraper
pinterest-image-scraper copied to clipboard
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":"[name="id"]"}
`from pinterest_scraper import scraper as s
from selenium import webdriver
chromedriverPath = '/home/shubhamturai/anaconda3/envs/pinterestScraper/lib/python3.8/site-packages/chromedriver_binary/chromedriver'
import os
os.chmod(chromedriverPath, 755)
chrome = webdriver.Chrome(chromedriverPath) #chrome = webdriver.Chrome()
ph = s.Pinterest_Helper("[email protected]" , "xxxxxxxxxxx", chrome)
images = ph.runme("https://www.pinterest.at/search/pins/?q=rug&rs=typed&term_meta[]=rug%7Ctyped")
s.download(images, "pinterest_dataset/rug")`
The error is :
Traceback (most recent call last):
File "main.py", line 8, in
This is my code but I am not able to get through this email and password stuff. Please help!
I am also having this error
Same problem here... I'm not sure but it seems its not working because the chromedriver cant log in pinterest account... maybe something has changed.
---> 16 ph = s.Pinterest_Helper("Email_here" , "Password_here", chrome) ---> 58 emailElem = self.browser.find_element_by_name('id') --> 496 return self.find_element(by=By.NAME, value=name) --> 976 return self.execute(Command.FIND_ELEMENT, { --> 242 raise exception_class(message, screen, stacktrace)
NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":"[name="id"]"} (Session info: chrome=86.0.4240.198)
FIXED PROBLEM --
Open Scraper.py and change in line 57
self.browser.get("https://www.pinterest.com")
for self.browser.get("https://br.pinterest.com/login/")
FIXED PROBLEM --
Open Scraper.py and change in line 57
self.browser.get("https://www.pinterest.com")
for self.browser.get("https://br.pinterest.com/login/")
Sorry doesn't work for me.
@aksthelion since i'm loggin from brazil, maybe you could try only self.browser.get("https://pinterest.com/login/")
instead of using the br
prefix. But i'm not sure if it will still work out.... used it a long time ago, maybe they can have updated it.
Changing url doesn't have much effect, it may be some other major error. I doubt if this script still works?