Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #-*-coding: cp1251 -*-
- import urllib2
- import cookielib
- inp = open("input.txt", "r")
- str = inp.readlines()
- for a in str:
- fname = a[:-1]
- out=open("".join(fname[7:])+".txt", "w")
- cookie = cookielib.CookieJar()
- opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cookie))
- urllib2.install_opener(opener)
- headers = {"User-Agent" : "Mozilla/4.0 (compatible; MSIE 5.5; WindowsNT)" }
- site = urllib2.urlopen(a[:-1])
- out.write(site.read())
- out.close()
Advertisement
Add Comment
Please, Sign In to add comment