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

c.Favorites not returning anything #844

Open ElizabethCappon opened 3 years ago

ElizabethCappon commented 3 years ago

Hi there,

This is the code in short:

c = twint.Config() c.Username = 'name' c.Store_csv = True c.Output = 'file_name' twint.run.Favorites(c)

I tried both Python 3.6 and 3.7 and I tried updating Twint with pip3 install --user --upgrade -e git+https://github.com/twintproject/twint.git@origin/master#egg=twint.

I found issue #805, but I'm still not able to scrape any likes with .Favorites.

When I use a proxy I don't get anything and the script just seems to hang for a while or I'll get "CRITICAL:root:twint.feed:Mobile:list index out of range".

Not using a proxy I get: "list index out of range [x] feed.MobileFav"

I tried using 'out = c.favorited_tweets_list', but I'll get: AttributeError: 'Config' object has no attribute 'favorited_tweets_list'

I tried it with a limit and without a limit and without storing it as csv. Nothing works.

I'm using Linux Ubuntu

.Favorites(c) not working, seems to be a returning problem. Is there anything that can be done?

ElizabethCappon commented 3 years ago

If I print out self.feed returned by feed.Mobile(response) in line 52 of run.py, tweets are returned. These are the likes I'm looking for. They show as followed: a href="/user_name2064/status/1285865786029088768?p=v">View conversation</a
How can I get Twint to save those on my machine?

AndrewCGreen commented 3 years ago

I found the same issue. So with some investigation, I looked primarily at the MobileFav() function in feed.py because it had no logging and line 34 was suspicioulsy different than line 22, which looked like they were doing the same thing. I attempted to change line 34 of feed.py tweets = soup.find_all("table", "tweet") to mirror line 22 tweets = soup.find_all("span", "metadata") because the original method was not locating any tweets. Unfortunately that renders the error CRITICAL:root:twint.run:Twint:favorite:favorite_field_lack I also tried adding some logging with no avail.

itcytandchenmeng commented 3 years ago

I have the same problem, I hope the blogger will give a solution

yunusemrecatalcam commented 3 years ago

Check this out! https://github.com/twintproject/twint/pull/870

sharad-s commented 3 years ago

+1 this