Giter VIP home page Giter VIP logo

twitter-analysis's People

Contributors

aldnav avatar briwa avatar d6o avatar dependabot[bot] avatar egnha avatar ferguras avatar hassium-269 avatar kennethreitz avatar marius92mc avatar paulrosset avatar red5d avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

twitter-analysis's Issues

Could you leave any contact to you?

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?

Retrieving more results

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...)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.