Python follow redirects and then download the page?

后端 未结 3 1657
我寻月下人不归
我寻月下人不归 2020-12-09 15:08

I have the following python script and it works beautifully.

import urllib2

url = \'http://abc.com\' # write the url here

usock = urllib2.urlopen(url)
dat         


        
3条回答
  •  情深已故
    2020-12-09 15:47

    Do you absolutely have to do it that way? How about using something like twill ( http://twill.idyll.org/) - makes what you want to do very easy (and it's Python).

提交回复
热议问题