
Python
dexfire29
这个作者很懒,什么都没留下…
展开
-
Python3 中 requests 使用 Cookies 访问资源
Python3 中 requests 使用 Cookies 访问资源Cookies 是http和https协议中用于访问时暂时记住用户身份,提供针对性资源、服务和权限的隐私数据,通过窃取用户cookies甚至可以进行包括窃取用户数据,访问、控制用户私有资源,伪装用户身份进行各种高危操作。cookies不一定需要登录才可获得,网站会根据浏览器提供的本机部分特征,在临时访问网站时为用户提供一个唯一...原创 2020-02-22 23:51:36 · 1340 阅读 · 0 评论 -
Python 中beautifulsoup乱码(实际上是requests返回结果乱码)
Python 中beautifulsoup乱码(实际上是requests返回结果乱码)for url in urls: resp = rq.get(url) # print(resp.content) bs = bs4.BeautifulSoup(resp.text, "html.parser") h1 = bs.findAll("h1") pattern...原创 2020-02-22 14:33:12 · 711 阅读 · 0 评论 -
Python 3中使用中文字符报错
Python 3中使用中文字符报错[Running] python -u "d:\CreatingSpace\VSCode\Python36\catelog\cat.py" File "d:\CreatingSpace\VSCode\Python36\catelog\cat.py", line 17SyntaxError: Non-ASCII character '\xe5' in fil...原创 2020-02-22 11:29:27 · 677 阅读 · 0 评论