from urllib import request
from urllib import parse
import urllib
import ssl
import time
import json
def getImgUrlAll(furl,sn,img,f,page_count):
furl=furl
sn=sn
img=img
f=f
page_count=page_count
img_urls_id=[] #文档中每页的地址
img_urls_id.append(img)
for indexs in range(sn,page_count):
json_url='https://view45.book118.com/PW/GetPage?f='+f+'&img='+img+'&isMobile=false&readLimit=z1SQwiTQU00uxfwJSFd6tA==&sn='+str(sn)+'&furl='+furl #请求获得文档地址的链接地址
context=ssl._create_unverified_context()
try:
url_response=urllib.request.urlopen(json_url,context=context)
json_data=url_response.read()
json_data=json.loads(json_data)
img=json_data['NextPage']
sn=json_data['PageIndex']
img_ur