File download via Post form

后端 未结 2 1608
再見小時候
再見小時候 2021-01-12 23:23

There is a website that has a list of files that I want to download. To ease the process I tried to write a script to do it for me. (Even though I can select multiple option

2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-12 23:45

    The line:

    req = urllib2.Request('webpage/list.php')
    

    is requesting the original web page, but the form posts data to webpage/data.php. Does this work better?

    req = urllib2.Request('webpage/data.php')
    

提交回复
热议问题