vladkens / twscrape

2024! X / Twitter API scrapper with authorization support. Allows you to scrape search results, User's profiles (followers/following), Tweets (favoriters/retweeters) and more.
https://pypi.org/project/twscrape/
MIT License
1.13k stars 132 forks source link

adding accounts with cookies programatically generates failing sessions #69

Closed codilau closed 1 year ago

codilau commented 1 year ago

As the title explains, the behaviour differs between the CLI command and the function. After comparing the .db files, the problem is that the function adds an extra "\n" char at the end of the ct0 value.

codilau commented 1 year ago

The fix is manually controlling from the file parsing, if anyone has this issue.

        username = parts[0]
        password = parts[1]
        email = parts[2]
        email_password = parts[3]
        cookies = parts[4][:-1]