-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
fix for deprecation of v1.1 endpoints : implemented search functionality #944
Conversation
@pielco11 I was just doing some more testing and there is one issue I found. Workaround for this is using proxy for getting the token and then making requests without using proxy. I have tested this and this works fine. Note : "tor" might also work for this. (haven't tested it yet though) |
@himanshudabas I can confirm that google cloud IPs work when scraping with Twint, I just fresh install twint using git clone in a debian instance and everything works as expected. |
Thank you for confirming this. |
I have also succeeded in scraping as usual, from a mobile connection in the United States in my case. I noticed that formats for Thank you. |
@NoSuck Could you share with me what previous |
The previous A greater issue I noticed just now is the retaining of newline characters in EDIT: It seems previously newline characters were simply replaced with spaces (U+0020). |
I took a look and will submit a PR shortly. |
As we all know that twitter is closing older v1.1 endpoints so a few weeks ago twitter closed the endpoint on which twint's search functionality relied upon. Which broke twint's search functionality.
So I've implemented the search functionality again using their new endpoints.
#917 Pull Request was made which relies on the mobile version of the twitter but it doesn't give all the tweets of the query and doesn't support advance queries either.
This is the list of what I have tested.
Tested on : Python 3.6.8
Features I've tested :
twint -u username
: workstwint -s pineapple
: workstwint -s "#hashtag"
: workstwint -s "hashtag" -o file.txt
twint -s "hashtag" -o file.csv --csv
Rest of the things I haven't tested yet, but I am quite certain most of the things won't directly work as the library is still broken. Although queries related to Search might work as the base Search functionality is working, so related queries will work too unless it depends on something that I have changed.
Need to test more to know what doesn't work.
Note: I've tested this on Python 3.6.8 because for some weird reason twitter's new endpoints aren't working with aiohttp on Python 3.8.6 ( haven't tested it on other versions though). even though aiohttp works fine when requesting other websites but for some reason it never returns anything when requesting twitter endpoints.