![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python
刘长栋
这个作者很懒,什么都没留下…
展开
-
Python HTTP user_Agent 请求头
[引用] 狗子渣渣 https://www.jianshu.com/p/c5cf6a1967d1查看请求信息,发现我们一般写的爬虫会默认告诉服务器自己发送了一个Python爬取请求,而一般网站是不允许被爬虫访问的,估计是因为会涉及到商业问题。最后,通过更改User-Agent字段就可以轻易骗过该网站。那么User-Agent到底是什么呢?User-Agent会告诉网站服务器,访问者是通过什么工具来请求的,如果是爬虫请求,一般会拒绝,如果是用户浏览器,就会应答。又该如何使用呢?调试工具最简单的转载 2021-11-12 15:05:08 · 192 阅读 · 0 评论 -
python 下载王者荣耀 网站英雄 皮肤
下载王者荣耀 网站英雄 皮肤#--*coding:utf-8*--# 下载 json文件,获取文件内容,并解析# 英雄编号及皮肤信息import os.pathimport randomimport timeimport requests #最简单易用的HTTP库,建议爬虫使用requestshero_list_url="https://pvp.qq.com/web201605/js/herolist.json"# 发送get请求 获取数据hero_list=requests.get转载 2021-11-11 23:28:38 · 220 阅读 · 0 评论 -
Python 错误提示收集
1 移动文件 复制文件“Destination path ‘%s’ already exists” % real_dst目标路径“%s”已存在“%real”try : shutil.move(文件, "长期不用文件/")except KeyError : continueexcept OSError : continu原创 2021-11-09 22:45:40 · 1936 阅读 · 1 评论 -
Python 给员工发工资条
“”"要求:根据工资表给员工fagognzi思路"先把工资条 整理出来,嵌入到发邮件系统里面“”"# -*- coding:utf-8 -*-import pandas as pd #载入pd模块df=pd.read_excel("制造中心-车身部花名册3.23.xlsx") #读入 Excel表格for row in range(0,df.index.size): # 生成工资条 (标签+单个员工的工资信息) payroll=df[row:row+1] pri原创 2021-11-03 22:04:44 · 1529 阅读 · 0 评论