- 博客(10)
- 收藏
- 关注
原创 sanic 与 flask 上传文件服务的区别
sanic版:# -*- coding: utf-8 -*-import osfrom sanic import Sanicfrom sanic.response import redirect, htmlapp = Sanic()@app.route('/', methods=['POST', 'GET'])async def upload(request): i...
2019-09-05 18:45:50 1905
转载 Scrapy邮件发送功能及爬虫停止信息
Spider中编写如下:from scrapy.mail import MailSenderfrom scrapy.xlib.pydispatch import dispatcherfrom scrapy import signals在class类的上方编写emial的链接配置信息:mailers= MailSender(smtphost="smtp.qq.com", # ...
2019-03-19 16:41:22 1278 2
原创 基于Python的Appium Android自动化爬坑路程总结
1、准备工作:Appium:appium-desktop-setup-1.11.0.exe # download:https://github.com/appium/appium-desktop/releases/tag/v1.11.0jdk:jdk-8u191-windows-x64weixin:weixin703android1400.apkeclipse:eclipse-...
2019-03-15 11:37:50 614
原创 scrapy加socks代理
scrapy middlewares:from txsocksx.http import SOCKS5Agentfrom twisted.internet import reactorfrom twisted.internet.endpoints import TCP4ClientEndpointfrom scrapy.core.downloader.webclient import _...
2019-02-27 19:32:12 4558 1
原创 git lfs提交超大文件
安装 Git LFSLinuxcurl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash sudo apt-get install git-lfsgit lfs track '文件名'git config lfs.contenttype false ...
2019-02-16 16:23:04 1421
原创 python利用danmu实时获取斗鱼等直播网站字幕
danmu 是一个开源的直播平台弹幕接口用python pip install danmu # -*- coding: utf-8 -*-import time, sysfrom danmu import DanMuClientimport pymongoclient = pymongo.MongoClient(host='localhost', port=2...
2019-01-17 15:03:56 1790 3
原创 python 操作mongodb进行批量update某一字段
import pymongomyclient = pymongo.MongoClient(host='localhost',port=27017)mydb = myclient["du_brand"]mycol = mydb["content"]mycol2 = mydb["content_new"]f1 = mycol.find({"color":{"$exists":True}...
2019-01-02 20:27:46 4493
转载 mysql ERROR 1524 (HY000): Plugin 'unix_socket' is not loaded解决方法
1. first, run these bash commandssudo /etc/init.d/mysql stop # stop mysql servicesudo mysqld_safe --skip-grant-tables & # start mysql without password# enter -> gomysql -uroot # connect t...
2018-12-28 10:31:59 2298
原创 ./vimrc编辑,根目录下 vim ~/.vimrc
"config begin"impressive : http://amix.dk/vim/vimrc.html"==========================================" general"==========================================set history=1000 " history存储长度...
2018-12-27 11:34:43 1062
原创 python 读取文件内容向多人发邮件
# -*- coding: utf-8 -*-import smtplibimport email.charsetchst = email.charset.Charset(input_charset = 'utf-8')# header里分别定义发件人,收件人(收件人如果是多个,用list即可)以及邮件主题。header=("From:%s\nTo:%s\nSubject:%s\n...
2018-09-13 19:29:04 1145
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人