python使用beautifulsoup爬取天涯鬼话点击量大的小说
#!/usr/bin/env python # -*- coding:utf-8 -*- """ 爬取天涯鬼话小说点击数多的 """ import urllib2 import time from bs4 import BeautifulSoup import sys reload(sys) sys.setdefaultencoding('utf-8') hostname = 'http://bbs.tianya.cn' novels = [] def crawler_first_page(url): page = urllib2.urlopen(url) soup =
用户评论