def parse(self,response):
url=response.url
#url='https://data.btcchina.com/data/ticker?market=all'
#hxs=HtmlXPathSelector(response)sss
hxs=json.loads(response.body_as_unicode())
item=BTC.items.BtcItem()
item['time']=self._get_sys_time()
item['now']=hxs['ticker_btccny']['buy']
item['height']=hxs['ticker_btccny']['high']
item['low']=hxs['ticker_btccny']['low']
yield item
yield Request(url)
评论列表
文章目录