01 2018 档案
摘要:1.安装 .netframe 2. 安装C++编译工具 3. 下载 zope.interface Twister.tar.gz scrapy.tar.gz 4. pip install <package>
阅读全文
摘要:将 base64为的字符串转换为图片 这样就可以在当前目录下生成一张名为img的图片啦
阅读全文
摘要:第一步 创建git repository 2. 选择你要Push的代码 并确定 3.
阅读全文
摘要:import requests # 1. headers url = 'https://api.github.com/some/endpoint' headers = {'user-agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/5
阅读全文
摘要:1. 创建项目 2. 创建爬虫(项目目录下 cd <projectName>) 3. 运行爬虫(项目目录下) 爬虫技巧 设置setting.py 1. 设置不遵循 ROBOTSTXT_OBEY 2. 设置延时 3. 设置 USER_AGENT 和 DEFAULT_REQUEST_HEADERS 4.
阅读全文
该文被密码保护。
摘要:1. vim .bashrc 1 # .bashrc 2 3 # User specific aliases and functions 4 export PS1='[\[\e[32;40m\]\u@\w]\$ ' 5 6 # Source global definitions 7 if [ -f /etc/bashrc ]; then 8 . /etc/bashrc 9 fi ...
阅读全文
摘要:1 @app.route('/') 2 def index(): 3 """ 4 读取一个cookies 5 :return: 6 """ 7 # 读取cookies 8 username = request.cookies.get('username') 9 # 存取cookies 10 return 'i lo...
阅读全文
摘要:http get和post区别 get: 显示传输 post: 隐示传输 http方法 get: 浏览器告知服务器: 只获取页面上的信息发给我 head: 只关心消息头 post: 想在url上发布信息。并且,服务器必须确保数据已存储且存储一次 put: 类似post,但是服务器可能触发了存储过程多
阅读全文
摘要:1. 新建一个app.py 2. 新建一个views.py 3. 新建一个models.py 3. 新建一个templates目录 4. 新建一个static目录
阅读全文