はじめに 前回の続きでスクレイピングについて書いていく。 準備 これまた本通りだと芸がないので、はてなブログの「注目」のタイトルとURLを抽出してCSVに出力する処理を作成した。 entryTitle.py import requests from bs4 import BeautifulSoup import csv url = 'https://hatenablog.com/' resp = requests.get(url) soup = BeautifulSoup(resp.content, 'html.parser') # <class 'bs4.element.Tag'> serv…