ferguras / twitter-analysis Goto Github PK
View Code? Open in Web Editor NEWScrape the Twitter Frontend API without authentication.
License: MIT License
Scrape the Twitter Frontend API without authentication.
License: MIT License
I wanna talk with you about something regarding to your repo and to do it faster and easier could you please give me any discord/twitter or smth like that to communicate?
Kudos for the project - really helpful, the only issue is the limit of 450 tweets (I managed to get to 600+ in some cases). It appears the limitation is in the number of pages that can be retrieved, eventually ending with following error:
File "C:/pyprojects/twitter-cluster/twitter_analysis.py", line 123, in <module>
for tweet in get_tweets('realDonaldTrump', tweets=10000,maxpages=1000):
File "C:/pyprojects/twitter-cluster/twitter_analysis.py", line 119, in get_tweets
yield from gen_tweets(tweets, retweets, notext, adddot, maxpages)
File "C:/pyprojects/twitter-cluster/twitter_analysis.py", line 27, in gen_tweets
url='bunk', default_encoding='utf-8')
File "C:\pyprojects\twitter-cluster\venv\lib\site-packages\requests_html.py", line 419, in __init__
element=PyQuery(html)('html') or PyQuery(f'<html>{html}</html>')('html'),
File "C:\pyprojects\twitter-cluster\venv\lib\site-packages\pyquery\pyquery.py", line 255, in __init__
elements = fromstring(context, self.parser)
File "C:\pyprojects\twitter-cluster\venv\lib\site-packages\pyquery\pyquery.py", line 99, in fromstring
result = getattr(lxml.html, meth)(context)
File "C:\pyprojects\twitter-cluster\venv\lib\site-packages\lxml\html\__init__.py", line 876, in fromstring
doc = document_fromstring(html, parser=parser, base_url=base_url, **kw)
File "C:\pyprojects\twitter-cluster\venv\lib\site-packages\lxml\html\__init__.py", line 765, in document_fromstring
"Document is empty")
lxml.etree.ParserError: Document is empty
When I try to do an endless scroll manually in twitter, I managed to get deeper into the history which insinuates that there might be a solution to the issue. would be happy to assist (although I did not manage to solve this by myself yet...)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.