test

Python code posted
created at 16 Dec 14:51

Edit | Back
1
2
3
4
5
6
7
8
def main():
      #登录验证
      # Create an OpenerDirector with support for Basic HTTP Authentication...
      auth_handler = urllib.request.HTTPBasicAuthHandler()
      auth_handler.add_password(realm='api.follow5.com',
    uri='http://api.follow5.com',
        user='user',passwd='mima')
      opener = urllib.request.build_opener(auth_handler)
352 Bytes in 2 ms with coderay