なにをした? 暇なときにニュース記事をすぐ探せるものが欲しかったのでGoogleニュースから記事情報を取得するものを作った. 単純にウェブスクレイピングがしたかった. なにをつかった? Python3 requests argparse HTMLParser 結果 $ python get_news.py --topic t --amount 10 Title: 「Appleは自動運転システムに注力している」ティム・クックCEO、開発を認める Link: http://www.gizmodo.jp/2017/06/tim-cook-accepts-developing-selfdriving-car.html Title: ランサムウェアに影響されない安全なOSとは? Link: http://gigazine.net/news/20170617-microsoft-ransomware-
![PythonでGoogleニュースから記事情報を取得する [ウェブスクレイピング] - TaillookTech](https://cdn-ak-scissors.b.st-hatena.com/image/square/06a15c64ba0ceec233d86d71001ebb29a9dcbf5d/height=288;version=1;width=512/https%3A%2F%2Fcdn.blog.st-hatena.com%2Fimages%2Ftheme%2Fog-image-1500.png)