python爬虫
from bs4 import BeautifulSoup
import re
import urllib.request, urllib.error
import xlwt
import sqlite3
import random
import requests
import time
def main():
baseurl = "https://movie.douban.com/top250?start="
datalist = getData(baseurl)
savepath = ".\\豆瓣电影Top250.xls"
saveData(datalist,savepath)
findLink = re.compile(r'<a href="(.*?)">')
findImgSrc = re.compile(r'<img.* src="(.*?)"', re.S)
findTitle = re.compile(r'<span class="title">(.*?)</span>')
findRating = re.compile(r'<span class="rating_num" property="v:average">(.*)</span>')
findJudge = re.compile(r'<span>(\d*)人评价</span>')
findInq = re.compile(r'<span class="inq">(.*)</span>')
findBd = re.compile(r'<p class="">(.*?)</p>'