# -*- coding:utf-8 -*-
import urllib
import urllib2
import re
import time
import os
import sys
from bs4 import BeautifulSoup
hello="请输入首位置与末位置(1~999)"
print hello.decode("utf-8")
page_start=input("page_start:")
page_end=input("page_end:")
start=int(page_start)
end=int(page_end)
path=os.getcwd()
new_path=os.path.join(path,'bilibili')
if not os.path.isdir(new_path):
os.mkdir(new_path)
file_url=new_path+"\AnimeList" + str(page_start) + "_" + str(page_end) + ".txt"
data = open(file_url,'w')
def GetPageInfo(page):
url = 'http://bangumi.bilibili.com/anime/3' + str(page)
user_agent = 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)'
headers = { 'User-Agent' : user_agent }
request = urllib2.Request(url,headers = headers)
response = urllib2