
notebook
xfs-coder
不畏惧...
展开
-
python中unicode编码的url如何正确解码
python爬虫的时候,有时候会遇到类似于 https://detail.tmall.com/item.htm?id\u003d567018911496\u0026ns\u003d1\u0026abbucket\u003d8这样的url,该如何正确解码呢,参看知乎大牛的解决方法:“https://detail.tmall.com/item.htm?id\u003d567018911496\u0...原创 2019-04-21 14:04:13 · 2447 阅读 · 0 评论 -
ubuntu上使用crontab定时执行python程序
1. 编写一个简单的python程序test.pyprint('hello, crontab!')print('-'*50)print('hello, crontab')2. 使用test.sh文件执行python程序(./test.sh)#!/bin/shcd `dirname $0` || exit 1python test.py >> run.log 2&g...原创 2019-10-17 14:24:56 · 415 阅读 · 0 评论 -
scrapy post请求的问题
scrapy发送post请求如果没有手动在请求头中添加content-type信息,scrapy会自动将Content-Type: application/x-www-form-urlencoded添加到请求头中或者你手动设置在请求头中添加Content-Type: application/x-www-form-urlencoded,以上情况,发送post请求,应该使用scrapy.For...原创 2019-11-05 19:58:30 · 323 阅读 · 0 评论