Pythonは知道日報のトップページのニュースの見出しを登ります.
938 ワード
import urllib.request
import re
url = 'http://daily.zhihu.com/'
def get_html(url):
html = urllib.request.urlopen(url).read()
html = html.decode('utf-8')
return html
def get_url_num(html):
res = re.compile('(.*)')
title=re.findll(reitle,newurl_)
print(title)
for newurl in get_クルクルnum(getsu):
ゲットするtitle(newurl)