Scweet icon indicating copy to clipboard operation
Scweet copied to clipboard

problem in following

Open topliftarm opened this issue 4 years ago • 4 comments

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

topliftarm avatar Feb 09 '21 11:02 topliftarm

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.

LangInteger avatar Feb 09 '21 14:02 LangInteger

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

topliftarm avatar Feb 09 '21 16:02 topliftarm

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.

LangInteger avatar Feb 10 '21 01:02 LangInteger

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")]"}

dataslug1 avatar Feb 19 '22 21:02 dataslug1