import urllib.request
import re
headers="user-agent","Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.81 Safari/537.36 SE 2.X MetaSr 1.0"
A=urllib.request.build_opener()
A.addheaders=[headers]
urllib.request.install_opener(A)
for i in range(0,3):
thisurl="https://www.qiushibaike.com/text/page/"+str(i+1)+"/"
data=urllib.request.urlopen(thisurl).read().decode("utf-8","ignore")
pat='.*?(.*?).*?
'
resoult=re.compile(pat,re.S).findall(data)
for j in range(0,len(resoult)):
print(resoult[j])
print("___________________")