Skip to content

Instantly share code, notes, and snippets.

View pankaj28843's full-sized avatar

Pankaj Kumar Singh pankaj28843

View GitHub Profile
@pankaj28843
pankaj28843 / parse_youtube_urls.py
Created February 26, 2012 18:00
Download multiple youtube videos at once
# -*- coding: utf-8 -*-
from BeautifulSoup import BeautifulSoup
input_file = file('input.txt')
soup = BeautifulSoup(input_file.read())
for a in soup.findAll('a'):
if 'watch?v=' in a['href']:
print 'http://www.youtube.com'+a['href']