Mottl / GetOldTweets3

A Python 3 library and a corresponding command line utility for accessing old tweets
MIT License
365 stars 127 forks source link

[Question] still 404 error.. #101

Open eo4929 opened 3 years ago

eo4929 commented 3 years ago

Has anyone solved the 404 error (recent endpoint issue)? I'd appreciate it if you could tell me how to do it.

Thank you for your reply !

Solin1998 commented 3 years ago

用不了了 换其他项目

DV777 commented 3 years ago

Same problem here... hopefully someone will manage to fix it soon...

J-t-p commented 3 years ago

I found a temporary work around that can be used until the 404 issue is fixed. It involves the requests and bs4 (Beautiful Soup) libraries ` import requests from bs4 import BeautifulSoup

contents = requests.get("https://mobile.twitter.com/username") soup = BeautifulSoup(contents.text, "html.parser")

tweets = soup.find_all("tr", {"class":"tweet-container"}) latest = tweets[0] print(latest.text) `

This will give you a list with the html for, if my counting is correct, the last 20 tweets from that account. Obviously, this is not as good of a program as GOT3, but it will help while we wait for the error to be fixed.

A few things to note: 1. You have to use the mobile link. It does not work with the normal link. (This can obviously still be ran on a desktop computer even with the mobile link) 2. You can use .text to print the tweet/store it to a variable without all the html code.

wandabwa2004 commented 3 years ago

Seems there is no solution till now. However, I stumbled upon Twint https://github.com/twintproject/twint that does the same thing. Works like a charm.

HeinrichWizardKreuser commented 3 years ago

so :eyes:, any word on a fix yet?

enesky commented 2 years ago

still no solution

sxaxmz commented 2 years ago

Persists no solution