Tuesday, 15 April 2014

python - Download file using wget -



python - Download file using wget -

i need download fits files webpage. i'm doing using -i wget options: store download file in list.txt file contains url1, url2... ,

$ wget -i list.txt

do know if there possibility same thing using python script? thanks.

assuming file contains 1 url per line, can this:

import urllib2 open('list.txt') my_list: line in my_list: response = urllib2.urlopen(line) html = response.read() # process page's source

python download wget

No comments:

Post a Comment