
爬虫
shlhhy
这个作者很懒,什么都没留下…
展开
-
线程ip使用
1. 安装与配置config执行以下命令,安装dotnet环境:sudo yum install libunwind libicu -ysudo rpm -Uvh https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpmsudo yum install dotnet-sdk-3.0 -y# 检查版本dotnet --version配置config# 将购买的用户名、密码输入[config]TID原创 2021-10-08 14:44:13 · 144 阅读 · 0 评论 -
socks防pb
https://blog.youkuaiyun.com/shlhhy/article/details/117926433原创 2021-06-18 14:37:08 · 132 阅读 · 0 评论 -
request 上传文件
近期,requests.post上传文件时,status_code返回200,服务器校验时返回400,提示文件为空,但之前的处理逻辑中已进行了文件大小的判断,若文件为空,则直接返回失败,推测是网络问题,实际原因未定。{'msg': '文件不能为空', 'code': 400, 'data': None}file_size = os.path.getsize(csv_dir + file_name)if file_size <= 0: return Falseresponse = r原创 2020-08-24 14:41:33 · 2359 阅读 · 0 评论 -
python selenium 爬虫 linux
linux下运行selenium 爬虫由于代码需要迁移至linux下定期更新维护,需要在linux下配置相关环境chrome浏览器:yum install 安装rpm包下载地址:http://dist.control.lth.se/public/CentOS-7/x86_64/google.x86_64/chromedriver:下载对应版本后放入 /usr/bin目录下添加执行权限:chmod +x /usr/bin/chromedriver查看二者的版本:chromedriver原创 2020-05-22 10:12:05 · 504 阅读 · 0 评论 -
python selenium 爬虫
海关总署网站新闻:http://www.customs.gov.cn/customs/xwfb34/302425/3049105/index.html采用python的requests抓取时网页返回412,各种尝试均未能解决问题。改用selenium尝试能否爬取。chrome浏览器,chrome://version,查看浏览器版本chromedriver,驱动器,二者版本需保持一致dirver的下载地址如下:http://chromedriver.storage.googleapis.com/in原创 2020-05-22 09:32:32 · 1471 阅读 · 1 评论