twitterscraper icon indicating copy to clipboard operation
twitterscraper copied to clipboard

Problem with twitter front-page ban

Open sm-ghavami opened this issue 3 years ago • 21 comments

Some changes to bypass twitter restrictions

sm-ghavami avatar Aug 12 '20 15:08 sm-ghavami

Tested, this worked great for me. Thanks!

neuensjohn avatar Aug 13 '20 01:08 neuensjohn

works for me too

narain1 avatar Aug 13 '20 04:08 narain1

worked for me too, only after patch.

renatocron avatar Aug 13 '20 18:08 renatocron

Works for me, when this changes will be released?

LeoVS09 avatar Aug 13 '20 19:08 LeoVS09

I don't know about this, I'm just testing today as beginner, every few tweets I got one from GamesRedDeer with tweet promoting a giveaway. With or without proxy. is this the expected result? it's always 1293568121329061889, no matter what query I do

https://twitter.com/GamesRedDeer/status/1293568121329061889

This is only happening when -c is passed (CSV), 1293568121329061889 is not found on the json file.

renatocron avatar Aug 13 '20 19:08 renatocron

Can anyone provide a guide for someone new on how to use this commit request?

sspartzz257 avatar Aug 14 '20 00:08 sspartzz257

click on files tab, then a diff will appear. on the right side, click on the three dots icon and click on "show file", the full file will load, then you search the "show raw" and open it, then copy all the content over the same file on your machine.

python cares for white spaces, that's why you should carefully copy the exactly file (you can download via wget/curl)

if you are running via docker, you should rebuild the image before running the command client.

On Thu, Aug 13, 2020, 21:18 sspartzz257 [email protected] wrote:

Can anyone provide a guide for someone new on how to use this commit request?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/taspinar/twitterscraper/pull/337#issuecomment-673771673, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOUQZEE2V5Q5CMNUH2QNETSAR7FDANCNFSM4P44VMMQ .

renatocron avatar Aug 14 '20 00:08 renatocron

Test and works for me

sspartzz257 avatar Aug 14 '20 01:08 sspartzz257

How I can implement this solution without modifying the module ?

christiangfv avatar Aug 14 '20 15:08 christiangfv

Worked as well. Thanks!

victorgois avatar Aug 14 '20 23:08 victorgois

This worked a few times, and then I get this error message and only a fraction of my limit.

Failed to parse JSON while requesting "https://twitter.com/i/search/timeline?f=tweets&vertical=default&include_available_features=1&include_entities=1&reset_error_state=false&src=typd&max_position=thGAVUV0VFVBaAwKqhpsTgySEWgoCogZGk3sohEjUAFQAlAFUAFQAVARUAFQAA&q=arson%20OR%20firebug%20since%3A2019-12-12%20until%3A2019-12-26&l=english" Traceback (most recent call last): File "/opt/anaconda3/lib/python3.8/site-packages/twitterscraper/query.py", line 109, in query_single_page html = json_resp['items_html'] or '' KeyError: 'items_html'

I also get errors for line 104 and 182 which doesn't resolve until a reinstall twitterscraper and the commit request.

Can anyone help? I'm a first time coder. Very, very new to this stuff.

wajonespress avatar Aug 15 '20 03:08 wajonespress

Thanks! I'm using Query Search with User Search, this work for a while, sometimes i get a lot of tweets and sometimes i get 0 tweets!

Sometimes i repeat the searches with the same keywords, Accounts and dates, and a i get different tweets.

GivenToFlyCoder avatar Aug 16 '20 17:08 GivenToFlyCoder

Thanks! I'm using Query Search with User Search, this work for a while, sometimes i get a lot of tweets and sometimes i get 0 tweets!

Sometimes I repeat the searches with the same keywords, Accounts, and dates, and a i get different tweets.

yeah same for me, I put the patch code and apparently the limit parameter doesn't work fine for instance I put "limit = 5" and I retrieve 142 tweets

HARDROCO avatar Aug 18 '20 03:08 HARDROCO

Getting 0 tweets still after updating this query.py file with the provided changes . Could anyone please explain how to implement the changes step wise. Thanks

don't worry, you have to go here https://github.com/taspinar/twitterscraper/pull/337/commits/2233682b3c04840531a94ba8ee3c3325d7bf6b4a

copy the green code lines and replace the red code lines in your query.py file and save it that's all and make sure to create a copy before do it

HARDROCO avatar Aug 18 '20 04:08 HARDROCO

Getting 0 tweets still after updating this query.py file with the provided changes . Could anyone please explain how to implement the changes step wise. Thanks

don't worry, you have to go here 2233682

copy the green code lines and replace the red code lines in your query.py file and save it that's all and make sure to create a copy before do it

Thank you so much, I can do scraping normally, with changing some code on query.py. Actually it is not stable because after succeeding at the first attempt, I got 0 tweets after that.

rizkysifaul avatar Aug 19 '20 04:08 rizkysifaul

Thanks for the PR! Anyone else receiving improper tweets (could be sponsored material) since using this patch?

Edit: Hm, the issue is even older. I just opened #342 for it. Still, our number of unmatching tweets has raised significantly since applying this PR ...

LinqLover avatar Aug 25 '20 13:08 LinqLover

It doesn't work again. Return 0 tweet.

jason1991220 avatar Sep 17 '20 16:09 jason1991220

I confirm that it is not working anymore since this midnight 18-09-2020.

Nellix avatar Sep 18 '20 07:09 Nellix

I confirm that it is not working anymore since this midnight 18-09-2020.

404 error with init_url, anyone knows how to fix if?

INIT_URL = 'https://twitter.com/i/search/timeline?f=tweets&vertical='
'default&include_available_features=1&include_entities=1&'
'reset_error_state=false&src=typd&max_position=-1&q={q}&l={lang}'

jason1991220 avatar Sep 18 '20 07:09 jason1991220

I get this ERROR:twitterscraper:An unknown error occurred! Returning tweets gathered so far.

rhz avatar Sep 19 '20 04:09 rhz

Some changes to bypass twitter restrictions

Seems this solution is NOT working again :-(

gautampal1947 avatar Sep 20 '20 13:09 gautampal1947