ronpaulordietrying
Member
- Joined
- May 31, 2011
- Messages
- 52
Hey guys,
I am a proffesional linux admin and I am glad to help you with your Ron Paul sites. Post any questions here. In order to get this kicked off I am going to post my script that automatically downloads the latest Ron Paul videos from youtube, something like this could be used to auto update your tube site with some tweaks but this what I simply use for my personell use to watch all the new Ron Paul videos. So lets get started.
This first command will grab all the urls for the latest 10 Ron Paul Paul videos posted on youtube and put it in a file called new_videos.txt:
so now we have our list of the last 10 vidoes with the keyword Ron and Paul posted on youtube. There is infinite possibilities we can use this list for but in this example lets download them all with a program called youtube-dl. This command should do that, although it will take quite a long time depending on your connection speed this will download all the videos at their maximum quality:
Ok now that our videos are downloaded or at least a few of them lets put them into a playlist and watch them, for this you will need mplayer. You can always just watch them in your favorite video player manually by browsing to this folder but this is common software so lets do this:
Now all of the videos you have downloaded fully will play, you can hit enter to skip through the videos....
Pretty basic but you get the whole idea. I hope I can inspire some people and perhaps improve on this later.
I am a proffesional linux admin and I am glad to help you with your Ron Paul sites. Post any questions here. In order to get this kicked off I am going to post my script that automatically downloads the latest Ron Paul videos from youtube, something like this could be used to auto update your tube site with some tweaks but this what I simply use for my personell use to watch all the new Ron Paul videos. So lets get started.
This first command will grab all the urls for the latest 10 Ron Paul Paul videos posted on youtube and put it in a file called new_videos.txt:
curl -s "https://gdata.youtube.com/feeds/api/videos?q=ron+paul&orderby=published&start-index=11&max-results=10&v=2
"|fold -s|grep "watch?"|awk -F "'" '{print $2}'|awk -F ";" '{print $1}' > new_videos.txt
so now we have our list of the last 10 vidoes with the keyword Ron and Paul posted on youtube. There is infinite possibilities we can use this list for but in this example lets download them all with a program called youtube-dl. This command should do that, although it will take quite a long time depending on your connection speed this will download all the videos at their maximum quality:
for i in `cat new_videos.txt`; do youtube-dl --max-quality mp4 $i; done
Ok now that our videos are downloaded or at least a few of them lets put them into a playlist and watch them, for this you will need mplayer. You can always just watch them in your favorite video player manually by browsing to this folder but this is common software so lets do this:
ls -lah|awk '{print $8}'|grep flv|grep -v part > playlist.txt && ls -lah|awk '{print $8}'|grep mp4|grep -v part >> playlist.txt && mplayer -playlist playlist.txt
Now all of the videos you have downloaded fully will play, you can hit enter to skip through the videos....
Pretty basic but you get the whole idea. I hope I can inspire some people and perhaps improve on this later.
Last edited: