How to scrape links to media tweets from a specific user?

Support / help / discussion forum for twitter bot
hacking
Posts: 57
Joined: Sat Oct 07, 2023 8:09 am

How to scrape links to media tweets from a specific user?

Post by hacking »

For instance, https://twitter.com/elonmusk/media, and the links are formatted like https://twitter.com/elonmusk/status/175 ... 58/video/1. I don't need to download the media files; I just want to obtain the links for all media files.
User avatar
martin@rootjazz
Site Admin
Posts: 34712
Joined: Fri Jan 25, 2013 10:06 pm
Location: The Funk
Contact:

Re: How to scrape links to media tweets from a specific user?

Post by martin@rootjazz »

Scrape tab
Tweet search
OUTPUT TYPE: details

input: @elonmusk
Search steps: User Media tweets


This will save a CSV of all the details, including the media URL, just copy the column you want

Regards,
Martin




Twitterdub custom search tutorial
- Explains how to build a search and specify how many results per step (optional)

https://www.youtube.com/watch?v=D1W2KnNciPI
hacking
Posts: 57
Joined: Sat Oct 07, 2023 8:09 am

Re: How to scrape links to media tweets from a specific user?

Post by hacking »

It seems like the program did not run successfully; there are no results.
Logfile:logs_60781
User avatar
martin@rootjazz
Site Admin
Posts: 34712
Joined: Fri Jan 25, 2013 10:06 pm
Location: The Funk
Contact:

Re: How to scrape links to media tweets from a specific user?

Post by martin@rootjazz »

ok twitter changed how they return the results.

I'll update the format file
User avatar
martin@rootjazz
Site Admin
Posts: 34712
Joined: Fri Jan 25, 2013 10:06 pm
Location: The Funk
Contact:

Re: How to scrape links to media tweets from a specific user?

Post by martin@rootjazz »

The next update will fix this. I shall let you know when it is ready.



Regards,
Martin
hacking
Posts: 57
Joined: Sat Oct 07, 2023 8:09 am

Re: How to scrape links to media tweets from a specific user?

Post by hacking »

As a test, I set it to retrieve 10,000 results, but the program, after obtaining a small number of results (around 10), switches to a completed status.
logfile:logs_55009
User avatar
martin@rootjazz
Site Admin
Posts: 34712
Joined: Fri Jan 25, 2013 10:06 pm
Location: The Funk
Contact:

Re: How to scrape links to media tweets from a specific user?

Post by martin@rootjazz »

My apologies, I only tested the first page, seems the paging had changed and I didn't realise.
hacking
Posts: 57
Joined: Sat Oct 07, 2023 8:09 am

Re: How to scrape links to media tweets from a specific user?

Post by hacking »

No problem, just let me know once you've fixed it.
User avatar
martin@rootjazz
Site Admin
Posts: 34712
Joined: Fri Jan 25, 2013 10:06 pm
Location: The Funk
Contact:

Re: How to scrape links to media tweets from a specific user?

Post by martin@rootjazz »

done

The next update will fix this. I shall let you know when it is ready.



Regards,
Martin
Post Reply