mp3怎么下小说,怎样在mp3上面下小说

首页 > 实用技巧 > 作者:YD1662023-06-11 07:34:23

也就是先通过*切割字符串,再将每个数字转换成字母。

通过以上分析,就有了思路:

全部代码:

import requests import json from bs4 import BeautifulSoup s = requests.Session() headers = { "Accept": "text/html,application/xhtml xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "Accept-Encoding": "gzip, deflate, br", "Host": "www.ishuyin.com", "Referer": "https://www.ishuyin.com/show-19248.html", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36" } def parse(url): ret = s.get(url=url, headers=headers) soup = BeautifulSoup(ret.content, "html.parser") d = soup.select("#urlDown")[0] h = d.attrs["href"].split("*") r = "".join([chr(int(x)) for x in h if x != ""]) return r def download(link, index): ss = requests.Session() ret = ss.get(link) with open("mp3/{}.mp3".format(index), 'wb') as file: file.write(ret.content) if __name__ == '__main__': for i in range(34, 123): url = "https://www.ishuyin.com/player.php?mov_id=19248&look_id={}&player=down".format(i) link = parse(url) download(link, i) print(u"第{}集下载完成".format(i))

效果:

mp3怎么下小说,怎样在mp3上面下小说(9)

mp3怎么下小说,怎样在mp3上面下小说(10)

mp3怎么下小说,怎样在mp3上面下小说(11)

mp3怎么下小说,怎样在mp3上面下小说(12)

上一页1234下一页

栏目热文

文档排行

本站推荐

Copyright © 2018 - 2021 www.yd166.com., All Rights Reserved.