![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python
文章平均质量分 52
李耳王
这个作者很懒,什么都没留下…
展开
-
Python汇总服务器日常巡检结果并发送邮件
服务器巡检 本文使用的均为阿里云服务器(多台服务器),使用shell脚本巡检服务器并将巡检结果上传至oss备份 #!/bin/sh # 服务器巡检 dir='/home/docker_data/backup' cd $dir # 日志文件名称 ip=xxx.xxx.xxx.xxx file_name=$ip'-'$(date +%d) # OSS保存路径 backup_dir='oss://xx-backup-shenzhen/rd1/product/server/logs/' # 清空日志文原创 2020-12-29 10:36:12 · 1196 阅读 · 0 评论 -
Python脚本多线程爬取网页信息
多线程爬取某网站歌手、MV及歌曲信息,解析网页元素;实现异步下载图片及记录入库操作 爬虫脚本 # -*- coding: utf-8 -*- import os import re import sys import ssl import time import _thread import requests import pymysql import threading import difflib import asyncio import aiomysql from bs4 import Bea原创 2020-12-24 10:33:01 · 371 阅读 · 1 评论 -
Python爬取网站图片的2种常见处理
分析网站数据接口,获取图片地址并下载 # -*- coding: utf-8 -*- import os import re import sys import ssl import xlwt import time import _thread import requests import pymysql import threading # 自定义线程 class myThread(thr...原创 2019-07-05 10:07:46 · 2159 阅读 · 0 评论 -
Python连接数据库并查询所需数据的实践
# -*- coding: utf-8 -*- import os import requests import pymysql import _thread #import threading # 自定义下载目录 path = 'F:/Reptilian/ysj/' # 线程锁 #lock = threading.Lock() # 线程树 threadNum = 50 # 请求头定义 ...原创 2019-07-05 09:57:25 · 1200 阅读 · 0 评论