python爬蟲"Hello World"級入門實例(二),使用json從中國天氣網抓取數據

1、二話不說先上代碼 python2.7版html #!/usr/bin/python2.7 #-*- coding=UTF-8 -*- import urllib import json def get_dic(url): page = urllib.urlopen(url) html = page.read() page.close() dic=json.loads(html)
相關文章
相關標籤/搜索