2017-05-01から1日間の記事一覧
htmlの構文解釈のライブラリです。 ○htmlの準備 # -*- coding: utf-8 -*- import urllib.request from bs4 import BeautifulSoup url = "http://python-remrin.hatenadiary.jp/" f = urllib.request.urlopen(url) html = f.read().decode('utf-8') soup = Be…
urllibはURLにアクセスするライブラリです。 urllibモジュールは、Python 3 で urllib.request, urllib.parse, urllib.error に分割されて名称変更されました。 ・urllib.request は URL を開いて読むためのモジュールです ・urllib.error は urllib.request…