摘要: logDebug(self.cfg_down_appdata, f"获取{lastId}的详情") t_list = [] with ThreadPoolExecutor(10) as executor: for info in list_info: f = executor.submit(self 阅读全文
posted @ 2020-06-24 09:46 莫贞俊晗 阅读(136) 评论(0) 推荐(0) 编辑
摘要: shell脚本-监控python进程是否在运行,没有则重启jingdong_prices_run.py 并发送邮件告知重启时间,否则不重启不发送邮件 ###定时检测京东商品状态 */5 * * * * sh /data/jingdong-app-spider-py/shell/check-jingd 阅读全文
posted @ 2020-06-22 20:52 莫贞俊晗 阅读(2339) 评论(0) 推荐(0) 编辑
摘要: ###python3安装的包 用国内资源如下: 阿里云 http://mirrors.aliyun.com/pypi/simple/ 中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/ 豆瓣(douban) http://pypi.douban.com/s 阅读全文
posted @ 2020-06-16 11:39 莫贞俊晗 阅读(1296) 评论(0) 推荐(0) 编辑
摘要: 正则图片链接并下载 ####示例1 import requests import re url = 'http://www.nipic.com/photo/jingguan/ziran/index.html' response = requests.get(url).text # print(res 阅读全文
posted @ 2020-06-06 12:41 莫贞俊晗 阅读(2522) 评论(0) 推荐(0) 编辑
摘要: import json from base64 import b64decode response = {"result":0,"system":{"redirect":0,"uid":"","controller":"otherAuthService","trace_id":"AC1000F715 阅读全文
posted @ 2020-06-03 20:52 莫贞俊晗 阅读(2634) 评论(0) 推荐(0) 编辑
摘要: ####示例1 priceinfo== {82620534: 41900, 82620542: 39900, 82620544: 39900, 82620557: 45900, 82620559: 40900, 82620560: 40900, 82620565: 40900, 82620567: 阅读全文
posted @ 2020-06-03 01:03 莫贞俊晗 阅读(291) 评论(0) 推荐(0) 编辑
摘要: ###appollo安装与部署 下载地址:链接:https://pan.baidu.com/s/1FdRS2wSHk72pPi6_FuhA4g 提取码:nr3p pip安装命令: python3 setup.py install 安装如下图 ####使用示例1 def apollo_fun(): t 阅读全文
posted @ 2020-05-26 16:58 莫贞俊晗 阅读(828) 评论(1) 推荐(0) 编辑
摘要: ###js的滑屏 1)以下脚本实现js滑屏 scroll="document.documentElement.scrollTop=800"#垂直滚动 px scroll = "document.documentElement.scrollLeft=1000"#水平滚动 scroll="window. 阅读全文
posted @ 2020-05-26 16:03 莫贞俊晗 阅读(738) 评论(0) 推荐(0) 编辑
摘要: ###删除文件夹下所有图片 file_name = "D:\\screenshot-snrks-png\\png-snrks" for root, dirs, files in os.walk(file_name): for name in files: if name.endswith(".png 阅读全文
posted @ 2020-05-26 14:16 莫贞俊晗 阅读(9147) 评论(0) 推荐(1) 编辑
摘要: ###selenium介绍及基本流程 什么是selenium 一款基于浏览器自动化的模块 和爬虫的关联: 模拟登录 便捷的获取动态加载的数据 缺点: 爬取数据的效率底 环境部署繁琐 模块下载: pip install selenium selenium如何获取动态加载的数据 环境安装:pip ins 阅读全文
posted @ 2020-05-26 01:28 莫贞俊晗 阅读(308) 评论(0) 推荐(0) 编辑