Web客户端验证Python代码示例

impatient_14063 7 0 py 2023-06-28 20:06:06

'''09_Web客户端验证.py''' import requests import re class NoteSpider: def init(self): self.headers = {"User-Agent":"Mozilla/5.0"} self.url = "http://code.tarena.com.cn/" self.proxies = {"http":"http://309435365:szayclhp@123.206.119.108:16817"} # auth参数存储用户名和密码(必须为元组) self.auth = ("tarenacode","code_2013") def getParsePage(self): res = requests.get(self.url, proxies=self.proxies, headers=self.headers, auth=self.auth) return res.text

用户评论
请输入评论内容
评分:
暂无评论