How can I pass my ID and my password to a website in Python using Google App Engine?

前端 未结 2 1771
我在风中等你
我在风中等你 2021-01-24 01:41

Here is a piece of code that I use to fetch a web page HTML source (code) by its URL using Google App Engine:

from google.appengine.api import urlfetch
url = \"h         


        
2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-24 02:39

    You can check for an HTTP status code of 401, "authorization required", and provide the kind of HTTP authorization (basic, digest, whatever) that the site is asking for -- see e.g. here for more details (there's not much that's GAE specific here -- it's a matter of learning HTTP details and obeying them!-).

提交回复
热议问题