How to download a webpage that require username and password?

前端 未结 3 855
情歌与酒
情歌与酒 2021-01-07 04:53

For example, I want to download this page after inserting username and password:

http://forum.ubuntu-it.org/

I have tryed with wget but doe

3条回答
  •  说谎
    说谎 (楼主)
    2021-01-07 05:39

    You can use the urllib2 module and with that it is possible do to basic and form based authentication (with cookies support).

    Here is a nice tutorial on your issue.

提交回复
热议问题