twintproject / twint

An advanced Twitter scraping & OSINT tool written in Python that doesn't use Twitter's API, allowing you to scrape a user's followers, following, Tweets and more while evading most API limitations.
MIT License
15.65k stars 2.72k forks source link

twint.run.favorites() returns nothing #1085

Open BallM4788 opened 3 years ago

BallM4788 commented 3 years ago

Make sure you've checked the following:

Command Ran

c = twint.Config()
c.Username = [USERNAME]
c.User_id = [USER_ID]
c.Format = "Username: {username} | TweetID: {id}"
c.Database = "recordedFaves.db"
c.Store_object = True
twint.run.Favorites(c)

Description of Issue

No data is returned. Console output:

[+] Inserting into Database: recordedFaves.db
list index out of range [x] feed.MobileFav
[!] Twitter does not return more data, scrape stops here.

Inserting print(str(e)) at line 120 of run.py and repeating the above commands gives the same output with an additional line:

[+] Inserting into Database: recordedFaves.db
list index out of range [x] feed.MobileFav
RequestUrl() got an unexpected keyword argument 'headers'
[!] Twitter does not return more data, scrape stops here.

EDIT (Dec 24, 2020): Inserting print(str(response.status)+ " " + str(response.reason)) at line 168 of get.py and repeating the above gives yet another line:

[+] Inserting into Database: recordedFaves.db
401 Authorization Required
list index out of range [x] feed.MobileFav
RequestUrl() got an unexpected keyword argument 'headers'
[!] Twitter does not return more data, scrape stops here.

The 401 error occurs when Twint requests [USERNAME]'s Likes page (https://twitter.com/[USERNAME]/likes?lang=en&max_id=-1).

Environment Details

Windows 7, in Eclipse via PyDev extension.

innocentius commented 3 years ago

1083 could be a similar issue.

BallM4788 commented 3 years ago

Edited the issue to add new information.

alexgeo20 commented 3 years ago

hi @BallM4788 have you had any luck scrapping favorites with this function? I tried running it today and got the same error and I'm wondering if there is a fix. Thank you!

twint -u tim --favorites -o output.csv --csv list index out of range [x] feed.MobileFav [!] Twitter does not return more data, scrape stops here.

cc @innocentius

BallM4788 commented 3 years ago

Nope, still doesn't work. I've just resorted to using Twitter's API.

Eleko commented 3 years ago

hi, i have exactly the same issue with same 401 error.

jnehring commented 3 years ago

i get the same error using the command line:

$ twint -u AfD --favorites
list index out of range [x] feed.MobileFav
[!] Twitter does not return more data, scrape stops here.

there where some warnings in the shell output also which i ommited for better readibility. the warning was 4 times

/home/jan/anaconda3/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject
ShotoZhao commented 3 years ago

i still have this issue, although refer to #870

b0163ba commented 3 years ago

twint -u USARNAME --favorites list index out of range [x] feed.MobileFav [!] Twitter does not return more data, scrape stops here.

What's the solution ??? Please.