2013-10-28から1日間の記事一覧

BeautifulSoupとwgetを組み合わせた自動ダウンロードスクリプト

#! /usr/bin/env python # -*- coding:utf-8 -*- from bs4 import BeautifulSoup import urllib2 import os url = "http://caseyscaverns.com/4/halloween5.html" html = urllib2.urlopen(url).read() soup = BeautifulSoup(html) contents = soup.findAll("…