2017-07-11から1日間の記事一覧

Python3メモ - BeautifulSoup4のあれこれ

BeautifulSoupとは Beautiful Soup is a Python library for pulling data out of HTML and XML files. It works with your favorite parser to provide idiomatic ways of navigating, searching, and modifying the parse tree. It commonly saves program…

Python3メモ - Web関連

requestsモジュールを用いたWebコンテンツへのアクセス >>> import requests >>> req = requests.open("https://www.google.com") >>> for k,v in req.headers.items(): ... print("[{}]{}".format(k,v)) [Date]Mon, 10 Jul 2017 04:10:28 GMT [Expires]-1 […