上一页 1 2 3 4 5 6 ··· 10 下一页
摘要: http://scrapinghub.com 阅读全文
posted @ 2017-12-13 10:08 不可叽叽歪歪 阅读(89) 评论(0) 推荐(0) 编辑
摘要: def parse(self, response): # Get the next index URLs and yield Requests next_sel = response.xpath('//*[contains(@class,"next")]//@href') for url in next_sel.extract(): yield Request(urlparse.urljoin(... 阅读全文
posted @ 2017-12-13 10:07 不可叽叽歪歪 阅读(139) 评论(0) 推荐(0) 编辑
摘要: title = item [“title”] yield Request(url,meta = {“title”:title},callback = self.parse_item) l.add_value('title',response.meta ['title'],MapCompose(unicode.stripunicode.title)) 阅读全文
posted @ 2017-12-13 10:04 不可叽叽歪歪 阅读(98) 评论(0) 推荐(0) 编辑
摘要: def parse(self, response): base_url = "http://web:9312/properties/" js = json.loads(response.body) for item in js: id = item["id"] url = base_url + "property_%06d.html" % id yield Request(url, callba... 阅读全文
posted @ 2017-12-13 09:59 不可叽叽歪歪 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 确认启用了Cookie 阅读全文
posted @ 2017-12-13 09:58 不可叽叽歪歪 阅读(118) 评论(0) 推荐(0) 编辑
摘要: Appery.io pip install --upgrade scrapyapperyio pip install --upgrade scrapyapperyio 阅读全文
posted @ 2017-12-13 09:51 不可叽叽歪歪 阅读(89) 评论(0) 推荐(0) 编辑
摘要: 将用两个规则替换预定义的规则变量,一个用于水平,一个用于垂直爬 阅读全文
posted @ 2017-12-13 09:49 不可叽叽歪歪 阅读(85) 评论(0) 推荐(0) 编辑
摘要: myFunction = lambda i: i.replace(',', '') def myFunction(i): return i.replace(',', '') 阅读全文
posted @ 2017-12-13 09:26 不可叽叽歪歪 阅读(267) 评论(0) 推荐(0) 编辑
摘要: 1 def parse(self,response): 2 l = ItemLoader(item = PropertiesItem(),response = response) 3 4 l.add_xpath('title','// * [@ itemprop =“name”] [1] / tex 阅读全文
posted @ 2017-12-13 09:24 不可叽叽歪歪 阅读(124) 评论(0) 推荐(0) 编辑
摘要: scrapy crawl spider -o item.json scrapy crawl basic -o“ftp:// user:pass@ftp.scrapybook.com/items.json” 阅读全文
posted @ 2017-12-13 09:21 不可叽叽歪歪 阅读(104) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 10 下一页