Scweet
Scweet copied to clipboard
problem in following
hi, thank you very much for your tools.
unfortunately i can not scrap following this is my error :
NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//a[contains(@href,"/following")]/span[1]/span[1]"} (Session info: headless chrome=88.0.4324.150)
best regards
You can set headless=False
to see all operations on chrome, and check if the page search as you set. If some strange things happen on the page, they may be the cause of the error.
Yes, when i set headless=False, chrome opened and target account is shown but this problem shown in terminal again: NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//a[contains(@href,"/following")]/span[1]/span[1]"} (Session info: headless chrome=88.0.4324.150)
when manually clicked on followers or following , login page shown and when in address manually append /followers or /following, profile page shown
I'm not that clear about Scweet's behaviour on this fuction. Here is,my suggestion.
As described in readme file of this project, access user file may need Twitter account to login as a pre-requisite. You can put yours in.env file to see if the problem get solved.
Hi I am also having this error intermittently, not sure what is causing it. Often it will happen part way through going through a list of users. It would be great if there was a way to write the results to file as they are scraped, so that they are not lost if an error occurs before the program finishes.
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//div[contains(@data-testid,"primaryColumn")]"}