摘要: json: import json data='{"id":"content","id2":"content2"}' jdata=json.loads(data) jdata.keys() jdata["id"] jdata['id2'] distribution: scrapy + scrapy- 阅读全文
posted @ 2017-10-23 12:14 兔子的尾巴_Mini 阅读(178) 评论(0) 推荐(0)
摘要: # -*- coding: utf-8 -*-import scrapyimport scrapyfrom scrapy.http import Request,FormRequestimport urllib.requestclass Mini1Spider(scrapy.Spider): nam 阅读全文
posted @ 2017-10-10 21:04 兔子的尾巴_Mini 阅读(234) 评论(0) 推荐(0)
摘要: 基础 创建数据库 CREATE DATABASE database-name 删除数据库 drop database dbname 备份sql server 创建 备份数据的 device USE master EXEC sp_addumpdevice 'disk', 'testBack', 'c: 阅读全文
posted @ 2017-10-09 11:21 兔子的尾巴_Mini 阅读(147) 评论(0) 推荐(0)
摘要: E:\m\f1>cd ..\ E:\m>scrapy startproject qsautoNew Scrapy project 'qsauto', using template directory 'd:\\users\\administrator\\appdata\\local\\program 阅读全文
posted @ 2017-10-08 14:30 兔子的尾巴_Mini 阅读(137) 评论(0) 推荐(0)
摘要: items: 阅读全文
posted @ 2017-10-08 12:09 兔子的尾巴_Mini 阅读(198) 评论(0) 推荐(0)
摘要: XPath :( html sign) (fast reaction) eg: "/" from head to search eg:/html/head/title : 专家析云南“火流星”空爆事件:不能算“行星撞地球” text() @(html sign) /html/head/title/t 阅读全文
posted @ 2017-10-07 13:48 兔子的尾巴_Mini 阅读(117) 评论(0) 推荐(0)
摘要: Available commands: bench Run quick benchmark test fetch Fetch a URL using the Scrapy downloader genspider Generate new spider using pre-defined templ 阅读全文
posted @ 2017-10-07 12:41 兔子的尾巴_Mini 阅读(170) 评论(0) 推荐(0)
摘要: #Author:Mini#!/usr/bin/env pythonimport urllib.requestimport reimport urllib.errorimport threadingheaders=("User-Agent","Mozilla/5.0 (Windows NT 10.0; 阅读全文
posted @ 2017-10-06 18:32 兔子的尾巴_Mini 阅读(149) 评论(0) 推荐(0)
摘要: #Author:Mini#!/usr/bin/env pythonimport reimport urllib.requestimport timeimport urllib.errordef use_proxy(proxy_addr,url): try: req=urllib.request.Re 阅读全文
posted @ 2017-10-06 17:35 兔子的尾巴_Mini 阅读(298) 评论(0) 推荐(0)
摘要: #Author:Mini#!/usr/bin/env pythonimport urllib.requestimport reimport urllib.errorheaders=("User-Agent","Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv: 阅读全文
posted @ 2017-10-04 11:48 兔子的尾巴_Mini 阅读(167) 评论(0) 推荐(0)