themost
1 #如果需要用户名和密码才能登陆网站,则需要认证设置auth=()
2 import requests
3 response = requests.get(url,auth=(\'user\',\'password\'))
4 
5 #或者
6 from requests.auth import HTTPBasicAuth
7 response = requests.get(url,auth=HTTPBasicAuth(\'user\',\'password\'))

 

分类:

技术点:

相关文章:

  • 2021-10-04
  • 2021-07-30
  • 2021-05-25
  • 2021-09-05
  • 2021-05-31
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-03
  • 2022-02-04
  • 2021-12-27
  • 2021-12-27
  • 2021-11-02
  • 2022-02-27
  • 2021-07-29
相关资源
相似解决方案