JustAnotherArchivist / snscrape

A social networking service scraper in Python
GNU General Public License v3.0
4.5k stars 713 forks source link

Scrape tweets by tweet ID #987

Closed sushiselite closed 1 year ago

sushiselite commented 1 year ago

Hey! Ive been playing around with snscrape a bit and trying to find a way to scrape tweets by their IDs... but have had no luck. I was wondering if this library has a way for me to do that...

I have tried the following implementations:

tweet = os.popen(f'snscrape --jsonl --max-results 1 twitter-status {tweet_id}').read() - this gives me a usage error

tweet = os.popen(f'snscrape --jsonl --max-results 1 twitter-search "since_id:{tweet_id}"').read() - this gives me a 403 bad request

JustAnotherArchivist commented 1 year ago

https://github.com/JustAnotherArchivist/snscrape/issues/137#issuecomment-1035710984