以下の内容はhttps://paper.hatenadiary.jp/entry/2016/10/18/012551より取得しました。


pythonで指定したウェブページのタイトルと説明を取得

やりたいこと

https://news.google.co.jp/news と入力したら 「google」について、Googleニュースが世界中のニュース提供元から集約した広範囲にわたる最新情報と出力したい。

やり方

import urllib2, time
from BeautifulSoup import BeautifulSoup

urls = 'https://news.google.co.jp/news'
html = urllib2.urlopen(urls).read()
soup = BeautifulSoup(html)

print soup.findAll(attrs={"name":"description"}) [0]['content'].encode('utf-8')



以上の内容はhttps://paper.hatenadiary.jp/entry/2016/10/18/012551より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14