Btc_Spiders.py 文件源码

python
阅读 16 收藏 0 点赞 0 评论 0

项目:Python 作者: wanghaoying 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号