Below are some of my scripts which I used to download videos for offline viewing.
Script1: One day I come across a motivational blog which I liked it a a lot. Below script will download all the podcasts from that site for my offline listening
import subprocess for i in range(5):
URL=urllib2.urlopen('http://getbusylivingblog.com/podcasts/page/' + str(i)+'/')
for i in re.findall('[a-zA-Z0-9_]+.mp3', URL.read()):
Script2: I created below script to download video files from puppetlabs webinars which is good resource to know what is happening in and around Puppet labs.
import urllib2, re, subprocess
response = urllib2.urlopen('http://puppetlabs.com/misc/webinars')
html = response.read()
data1 = re.findall('/webinars/[a-z0-9-]+', html)
for link1 in data1:
str1 = 'http://puppetlabs.com'+link1
response2 = urllib2.urlopen(str1)
html2 = response2.read()
data2 = re.findall('player.vimeo.com/video/[0-9]+',html2)
for link2 in data2:
Will update this post with more of my scripts.
Latest posts by Surendra Anne (see all)
- FREE: JOIN OUR DEVOPS TELEGRAM GROUPS - August 2, 2019
- Review: Whizlabs Practice Tests for AWS Certified Solutions Architect Professional (CSAP) - August 27, 2018
- How to use ohai/chef-shell to get node attributes - July 19, 2018
- wget download a file to a directory in Linux/Unix - June 4, 2018
- GIT: How to compare two GIT branches? - June 3, 2018