bisguzar / twitter-scraper

Scrape the Twitter Frontend API without authentication.
MIT License
3.94k stars 603 forks source link

Unable to scrap tweets, if first tweet or pinned tweet contains only an image #67

Open trustedlain opened 5 years ago

trustedlain commented 5 years ago

Trying to run your test script with the random user https://twitter.com/preta_6 whos first tweet is only a picture, running the basic example from your readme.md gives me this error.

File "twitterTest2.py", line 3, in <module> for tweet in get_tweets('preta_6', pages=1): File "/home/username/twitterToMastodon/env/lib/python3.7/site-packages/twitter_scraper.py", line 78, in get_tweets yield from gen_tweets(pages) File "/home/username/twitterToMastodon/env/lib/python3.7/site-packages/twitter_scraper.py", line 42, in gen_tweets replies = int(interactions[0].split(" ")[0].replace(comma, "").replace(dot,"")) ValueError: invalid literal for int() with base 10: '1\xa0256'

bisguzar commented 5 years ago

Which python3 version you are running with?

trustedlain commented 5 years ago

I'm using python 3.7.3

bisguzar commented 5 years ago

Can you update source with referenced to #45 and check for output?

vranki commented 4 years ago

I am seeing this now with any account, even the example code in README. Version is 0.3.0, latest from PyPi.

bisguzar commented 4 years ago

@vranki the version stored in pypi is deprecated. I don't have permissions to push never versions to PyPI (cc @kennethreitz ). Please install from source