课堂派批量下载PDF

简述(一句话说明方案)

在这里插入图片描述
从网络请求里找到第一个getCourseContent ,挨个找出响应中的rurl就行
(rurl是直接下载pdf url是在线预览PDF)
如果文件不允许直接下载,参考我前面的文章https://blog.csdn.net/sucr233/article/details/114501594#comments_25965207

ps 之前文章有人问.ppt不允许下载怎么办,我手头没这种情况,所以之后再说吧

ps2 打码好麻烦后面还是不打了

分析网络请求

首先进入到资料界面,F12-网络-刷新,找到getCourseContent -响应
复制响应的值
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
(rurl是直接下载pdf url是在线预览PDF)

下面需要从响应的json中提取到下载链接
注: 其实从"预览"的第一行复制也行,不过需要压缩一下json为一行

python下载脚本

下面是通用的提取下载链接脚本, 提取后会打印到控制台
注:提示类似错误(SyntaxError: Non-UTF-8 code starting with ‘\xe4’ in file jiansuo.py on line 4, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details)的话,修改第一行的编码

#-*- coding:utf-8 -*-
import json

json_data = '...'  # 将JSON数据赋值给json_data变量

data = json.loads(json_data)  # 解析JSON数据为Python字典

rurl_list = []  # 用于存储所有的"rurl"值

# 遍历每个列表项
for item in data["data"]["list"]:
    attachments = item["attachment"]
    # 遍历每个附件
    for attachment in attachments:
        rurl = attachment["rurl"]
        rurl_list.append(rurl)

# 输出所有的"rurl"值
for rurl in rurl_list:
    print(rurl)

下面是实例(json是我自己的,从预览复制并压缩,不保证能一直正常运行)

#-*- coding:utf-8 -*-
import json

json_data = '{"status":1,"code":10000,"message":"访问成功","data":{"currentPage":1,"pageSize":50,"pageTotal":1,"total":12,"list":[{"id":"MDAwMDAwMDAwMLOGudyGz69rhd6GoQ","courseid":"MDAwMDAwMDAwMLOGx5WH37NthKVyoQ","dirid":[],"createtime":"1676202997","attachment":[{"fileid":"MDAwMDAwMDAwMLOGx5aHz9GxhM6G3Q","ext":"https://assets.ketangpai.com/openapiv5/Public/Common/img/fileicon/file_ext_big_pdf.png","ext_s":"https://assets.ketangpai.com/openapiv5/Public/Common/img/fileicon/file_ext_big_pdf.png","ext_type":"pdf","size":"3.89MB","name":"现代交换技术 第1章 绪论.pdf","url":"https://downloadv5.ketangpai.com/File/download/id/MDAwMDAwMDAwMLOGx5aHz9GxhM6G3Q/expires/1683797876/sign/61f93445ba35c9a91c890ddee3cce1fdbf9b59da/token/eb93f7ac257636809ccb44ce18a9e12a505e593730a66763ee080acf972f72ad/uid/MDAwMDAwMDAwMLScsdyGz79ohctyoQ.html","date":"2023-02-12 19:56","rurl":"https://openapiv5.ketangpai.com/PluginApp/to/id/MDAwMDAwMDAwMLOGx5aHz9GxhM6G3Q/expires/1683797876/sign/61f93445ba35c9a91c890ddee3cce1fdbf9b59da/token/eb93f7ac257636809ccb44ce18a9e12a505e593730a66763ee080acf972f72ad/uid/MDAwMDAwMDAwMLScsdyGz79ohctyoQ.html"}],"sort":"0","candownload":"1","title":"现代交换技术 第1章 绪论.pdf","status":3,"studyduration":"0","fullscore":"0","endtime":"0","releasetime":"1676202990","live_speed":"1","live_progress":"1","live_skiptest":"2","type":"5","folder":null,"filetype":[],"statistics":{"learning":0,"unlearned":0,"completed":0,"barrage":0,"question":0,"interactive":0,"watchtime":0,"videoTimeTotal":null},"lessonlink":[],"release":1,"state":1,"contenttype":"2","index":"0","item_type":1,"activitylabel":"资料","copyright":"0"},{"id":"MDAwMDAwMDAwMLOGudyHz7-vhd6KoQ","courseid":"MDAwMDAwMDAwMLOGx5WH37NthKVyoQ","dirid":[],"createtime":"1676798556","attachment":[{"fileid":"MDAwMDAwMDAwMLOGx5iG36uvhrh6lw","ext":"https://assets.ketangpai.com/openapiv5/Public/Common/img/fileicon/file_ext_big_pdf.png","ext_s":"https://assets.ketangpai.com/openapiv5/Public/Common/img/fileicon/file_ext_big_pdf.png","ext_type":"pdf","size":"4.48MB","name":"现代交换技术第2章 电路交换 - 交换单元与交换网络.pdf","url":"https://downloadv5.ketangpai.com/File/download/id/MDAwMDAwMDAwMLOGx5iG36uvhrh6lw/expires/1683797876/sign/5f9b720dc924aed227950db526c86baeb6fb1c77/token/eb93f7ac257636809ccb44ce18a9e12a505e593730a66763ee080acf972f72ad/uid/MDAwMDAwMDAwMLScsdyGz79ohctyoQ.html","date":"2023-02-19 17:22","rurl":"https://openapiv5.ketangpai.com/PluginApp/to/id/MDAwMDAwMDAwMLOGx5iG36uvhrh6lw/expires/1683797876/sign/5f9b720dc924aed227950db526c86baeb6fb1c77/token/eb93f7ac257636809ccb44ce18a9e12a505e593730a66763ee080acf972f72ad/uid/MDAwMDAwMDAwMLScsdyGz79ohctyoQ.html"}],"sort":"0","candownload":"1","title":"现代交换技术第2章 电路交换 - 交换单元与交换网络.pdf","status":3,"studyduration":"0","fullscore":"0","endtime":"0","releasetime":"1676798551","live_speed":"1","live_progress":"1","live_skiptest":"2","type":"5","folder":null,"filetype":[],"statistics":{"learning":0,"unlearned":0,"completed":0,"barrage":0,"question":0,"interactive":0,"watchtime":0,"videoTimeTotal":null},"lessonlink":[],"release":1,"state":1,"contenttype":"2","index":"0","item_type":1,"activitylabel":"资料","copyright":"0"},{"id":"MDAwMDAwMDAwMLOGud6Gqbdohd6YoQ","courseid":"MDAwMDAwMDAwMLOGx5WH37NthKVyoQ","dirid":[],"createtime":"1677743531","attachment":[{"fileid":"MDAwMDAwMDAwMLOGy5aIqatshqiK3g","ext":"https://assets.ketangpai.com/openapiv5/Public/Common/img/fileicon/file_ext_big_pdf.png","ext_s":"https://assets.ketangpai.com/openapiv5/Public/Common/img/fileicon/file_ext_big_pdf.png","ext_type":"pdf","size":"3.92MB","name":"现代交换技术第2章 电路交换-2.2.pdf","url":"https://downloadv5.ketangpai.com/File/download/id/MDAwMDAwMDAwMLOGy5aIqatshqiK3g/expires/1683797876/sign/10db92148b232619eb88e5c446d33b2f970efcf7/token/eb93f7ac257636809ccb44ce18a9e12a505e593730a66763ee080acf972f72ad/uid/MDAwMDAwMDAwMLScsdyGz79ohctyoQ.html","date":"2023-03-02 15:52","rurl":"https://openapiv5.ketangpai.com/PluginApp/to/id/MDAwMDAwMDAwMLOGy5aIqatshqiK3g/expires/1683797876/sign/10db92148b232619eb88e5c446d33b2f970efcf7/token/eb93f7ac257636809ccb44ce18a9e12a505e593730a66763ee080acf972f72ad/uid/MDAwMDAwMDAwMLScsdyGz79ohctyoQ.html"}],"sort":"0","candownload":"1","title":"现代交换技术第2章 电路交换-2.2.pdf","status":3,"studyduration":"0","fullscore":"0","endtime":"0","releasetime":"1677743522","live_speed":"1","live_progress":"1","live_skiptest":"2","type":"5","folder":null,"filetype":[],"statistics":{"learning":0,"unlearned":0,"completed":0,"barrage":0,"question":0,"interactive":0,"watchtime":0,"videoTimeTotal":null},"lessonlink":[],"release":1,"state":1,"contenttype":"2","index":"0","item_type":1,"activitylabel":"资料","copyright":"0"},{"id":"MDAwMDAwMDAwMLOGud6HudFthqiOoQ","courseid":"MDAwMDAwMDAwMLOGx5WH37NthKVyoQ","dirid":[],"createtime":"1678340894","attachment":[{"fileid":"MDAwMDAwMDAwMLOGz9yGuclshKic3Q","ext":"https://assets.ketangpai.com/openapiv5/Public/Common/img/fileicon/file_ext_big_pdf.png","ext_s":"https://assets.ketangpai.com/openapiv5/Public/Common/img/fileicon/file_ext_big_pdf.png","ext_type":"pdf","size":"3.2MB","name":"现代交换技术第2章 电路交换-2.3.pdf","url":"https://downloadv5.ketangpai.com/File/download/id/MDAwMDAwMDAwMLOGz9yGuclshKic3Q/expires/1683797877/sign/d7145147fa88583fb69c789553a90cce4be907cc/token/eb93f7ac257636809ccb44ce18a9e12a505e593730a66763ee080acf972f72ad/uid/MDAwMDAwMDAwMLScsdyGz79ohctyoQ.html","date":"2023-03-09 13:48","rurl":"https://openapiv5.ketangpai.com/PluginApp/to/id/MDAwMDAwMDAwMLOGz9yGuclshKic3Q/expires/1683797877/sign/d7145147fa88583fb69c789553a90cce4be907cc/token/eb93f7ac257636809ccb44ce18a9e12a505e593730a66763ee080acf972f72ad/uid/MDAwMDAwMDAwMLScsdyGz79ohctyoQ.html"}],"sort":"0","candownload":"1","title":"现代交换技术第2章 电路交换-2.3.pdf","status":3,"studyduration":"0","fullscore":"0","endtime":"0","releasetime":"1678340890","live_speed":"1","live_progress":"1","live_skiptest":"2","type":"5","folder":null,"filetype":[],"statistics":{"learning":0,"unlearned":0,"completed":0,"barrage":0,"question":0,"interactive":0,"watchtime":0,"videoTimeTotal":null},"lessonlink":[],"release":1,"state":1,"contenttype":"2","index":"0","item_type":1,"activitylabel":"资料","copyright":"0"},{"id":"MDAwMDAwMDAwMLOGud6IuclqhaiYoQ","courseid":"MDAwMDAwMDAwMLOGx5WH37NthKVyoQ","dirid":[],"createtime":"1678952782","attachment":[{"fileid":"MDAwMDAwMDAwMLOGz5SIuc2xhqiG3Q","ext":"https://assets.ketangpai.com/openapiv5/Public/Common/img/fileicon/file_ext_big_pdf.png","ext_s":"https://assets.ketangpai.com/openapiv5/Public/Common/img/fileicon/file_ext_big_pdf.png","ext_type":"pdf","size":"3.21MB","name":"现代交换技术第2章 电路交换-2.3最终.pdf","url":"https://downloadv5.ketangpai.com/File/download/id/MDAwMDAwMDAwMLOGz5SIuc2xhqiG3Q/expires/1683797877/sign/f0a34fb2b83f7a8d3ea2eb2779dc43b74fbb5704/token/eb93f7ac257636809ccb44ce18a9e12a505e593730a66763ee080acf972f72ad/uid/MDAwMDAwMDAwMLScsdyGz79ohctyoQ.html","date":"2023-03-16 15:46","rurl":"https://openapiv5.ketangpai.com/PluginApp/to/id/MDAwMDAwMDAwMLOGz5SIuc2xhqiG3Q/expires/1683797877/sign/f0a34fb2b83f7a8d3ea2eb2779dc43b74fbb5704/token/eb93f7ac257636809ccb44ce18a9e12a505e593730a66763ee080acf972f72ad/uid/MDAwMDAwMDAwMLScsdyGz79ohctyoQ.html"}],"sort":"0","candownload":"1","title":"现代交换技术第2章 电路交换-2.3最终.pdf","status":3,"studyduration":"0","fullscore":"0","endtime":"0","releasetime":"1678952775","live_speed":"1","live_progress":"1","live_skiptest":"2","type":"5","folder":null,"filetype":[],"statistics":{"learning":0,"unlearned":0,"completed":0,"barrage":0,"question":0,"interactive":0,"watchtime":0,"videoTimeTotal":null},"lessonlink":[],"release":1,"state":1,"contenttype":"2","index":"0","item_type":1,"activitylabel":"资料","copyright":"0"},{"id":"MDAwMDAwMDAwMLOGuZSGqbdrhN6GoQ","courseid":"MDAwMDAwMDAwMLOGx5WH37NthKVyoQ","dirid":[],"createtime":"1679101182","attachment":[{"fileid":"MDAwMDAwMDAwMLOGsZSGqbuwhM6G3A","ext":"https://assets.ketangpai.com/openapiv5/Public/Common/img/fileicon/file_ext_big_pdf.png","ext_s":"https://assets.ketangpai.com/openapiv5/Public/Common/img/fileicon/file_ext_big_pdf.png","ext_type":"pdf","size":"693.35KB","name":"现代交换技术课件(第三章  信令系统1).pdf","url":"https://downloadv5.ketangpai.com/File/download/id/MDAwMDAwMDAwMLOGsZSGqbuwhM6G3A/expires/1683797877/sign/ae88389860dce2f5d9c72edaf69eb6f63a29d5a8/token/eb93f7ac257636809ccb44ce18a9e12a505e593730a66763ee080acf972f72ad/uid/MDAwMDAwMDAwMLScsdyGz79ohctyoQ.html","date":"2022-03-10 19:54","rurl":"https://openapiv5.ketangpai.com/PluginApp/to/id/MDAwMDAwMDAwMLOGsZSGqbuwhM6G3A/expires/1683797877/sign/ae88389860dce2f5d9c72edaf69eb6f63a29d5a8/token/eb93f7ac257636809ccb44ce18a9e12a505e593730a66763ee080acf972f72ad/uid/MDAwMDAwMDAwMLScsdyGz79ohctyoQ.html"}],"sort":"0","candownload":"1","title":"现代交换技术课件(第三章  信令系统1).pdf","status":3,"studyduration":"0","fullscore":"0","endtime":"0","releasetime":"1679101193","live_speed":"0","live_progress":"0","live_skiptest":"0","type":"5","folder":null,"filetype":[],"statistics":{"learning":0,"unlearned":0,"completed":0,"barrage":0,"question":0,"interactive":0,"watchtime":0,"videoTimeTotal":null},"lessonlink":[],"release":1,"state":1,"contenttype":"2","index":"0","item_type":1,"activitylabel":"资料","copyright":"0"},{"id":"MDAwMDAwMDAwMLOGuZSGqbdrhN6CoQ","courseid":"MDAwMDAwMDAwMLOGx5WH37NthKVyoQ","dirid":[],"createtime":"1679101182","attachment":[{"fileid":"MDAwMDAwMDAwMLOGsZSGqbdphc6O3Q","ext":"https://assets.ketangpai.com/openapiv5/Public/Common/img/fileicon/file_ext_big_pdf.png","ext_s":"https://assets.ketangpai.com/openapiv5/Public/Common/img/fileicon/file_ext_big_pdf.png","ext_type":"pdf","size":"2.23MB","name":"现代交换技术课件(第三章  信令系统2).pdf","url":"https://downloadv5.ketangpai.com/File/download/id/MDAwMDAwMDAwMLOGsZSGqbdphc6O3Q/expires/1683797877/sign/5cca7ec196771bc60dd60632786c40d74de2d16a/token/eb93f7ac257636809ccb44ce18a9e12a505e593730a66763ee080acf972f72ad/uid/MDAwMDAwMDAwMLScsdyGz79ohctyoQ.html","date":"2022-03-10 19:26","rurl":"https://openapiv5.ketangpai.com/PluginApp/to/id/MDAwMDAwMDAwMLOGsZSGqbdphc6O3Q/expires/1683797877/sign/5cca7ec196771bc60dd60632786c40d74de2d16a/token/eb93f7ac257636809ccb44ce18a9e12a505e593730a66763ee080acf972f72ad/uid/MDAwMDAwMDAwMLScsdyGz79ohctyoQ.html"}],"sort":"0","candownload":"1","title":"现代交换技术课件(第三章  信令系统2).pdf","status":3,"studyduration":"0","fullscore":"0","endtime":"0","releasetime":"1679101193","live_speed":"0","live_progress":"0","live_skiptest":"0","type":"5","folder":null,"filetype":[],"statistics":{"learning":0,"unlearned":0,"completed":0,"barrage":0,"question":0,"interactive":0,"watchtime":0,"videoTimeTotal":null},"lessonlink":[],"release":1,"state":1,"contenttype":"2","index":"0","item_type":1,"activitylabel":"资料","copyright":"0"},{"id":"MDAwMDAwMDAwMLOGuZSGqbdrhM6goQ","courseid":"MDAwMDAwMDAwMLOGx5WH37NthKVyoQ","dirid":[],"createtime":"1679101182","attachment":[{"fileid":"MDAwMDAwMDAwMLOGtZSGubuwhN6K3Q","ext":"https://assets.ketangpai.com/openapiv5/Public/Common/img/fileicon/file_ext_big_pdf.png","ext_s":"https://assets.ketangpai.com/openapiv5/Public/Common/img/fileicon/file_ext_big_pdf.png","ext_type":"pdf","size":"2.29MB","name":"现代交换技术课件(第八章 MPLS多协议标记交换技术1).pdf","url":"https://downloadv5.ketangpai.com/File/download/id/MDAwMDAwMDAwMLOGtZSGubuwhN6K3Q/expires/1683797877/sign/540abf0cec06a9ee27b75da707ab9e10f0f85d30/token/eb93f7ac257636809ccb44ce18a9e12a505e593730a66763ee080acf972f72ad/uid/MDAwMDAwMDAwMLScsdyGz79ohctyoQ.html","date":"2022-05-04 14:26","rurl":"https://openapiv5.ketangpai.com/PluginApp/to/id/MDAwMDAwMDAwMLOGtZSGubuwhN6K3Q/expires/1683797877/sign/540abf0cec06a9ee27b75da707ab9e10f0f85d30/token/eb93f7ac257636809ccb44ce18a9e12a505e593730a66763ee080acf972f72ad/uid/MDAwMDAwMDAwMLScsdyGz79ohctyoQ.html"}],"sort":"0","candownload":"1","title":"现代交换技术课件(第八章 MPLS多协议标记交换技术1).pdf","status":3,"studyduration":"0","fullscore":"0","endtime":"0","releasetime":"1679101193","live_speed":"0","live_progress":"0","live_skiptest":"0","type":"5","folder":null,"filetype":[],"statistics":{"learning":0,"unlearned":0,"completed":0,"barrage":0,"question":0,"interactive":0,"watchtime":0,"videoTimeTotal":null},"lessonlink":[],"release":1,"state":-1,"contenttype":"2","index":"0","item_type":1,"activitylabel":"资料","copyright":"0"},{"id":"MDAwMDAwMDAwMLOGuZSGqbdrhM6coQ","courseid":"MDAwMDAwMDAwMLOGx5WH37NthKVyoQ","dirid":[],"createtime":"1679101182","attachment":[{"fileid":"MDAwMDAwMDAwMLOGtZSHqc2yhM6clw","ext":"https://assets.ketangpai.com/openapiv5/Public/Common/img/fileicon/file_ext_big_pdf.png","ext_s":"https://assets.ketangpai.com/openapiv5/Public/Common/img/fileicon/file_ext_big_pdf.png","ext_type":"pdf","size":"3.09MB","name":"现代交换技术课件(第九章 NGN和软交换).pdf","url":"https://downloadv5.ketangpai.com/File/download/id/MDAwMDAwMDAwMLOGtZSHqc2yhM6clw/expires/1683797877/sign/72435341a1a82d90abeb4b05b1177de2f4a864a1/token/eb93f7ac257636809ccb44ce18a9e12a505e593730a66763ee080acf972f72ad/uid/MDAwMDAwMDAwMLScsdyGz79ohctyoQ.html","date":"2022-05-06 10:18","rurl":"https://openapiv5.ketangpai.com/PluginApp/to/id/MDAwMDAwMDAwMLOGtZSHqc2yhM6clw/expires/1683797877/sign/72435341a1a82d90abeb4b05b1177de2f4a864a1/token/eb93f7ac257636809ccb44ce18a9e12a505e593730a66763ee080acf972f72ad/uid/MDAwMDAwMDAwMLScsdyGz79ohctyoQ.html"}],"sort":"0","candownload":"1","title":"现代交换技术课件(第九章 NGN和软交换).pdf","status":3,"studyduration":"0","fullscore":"0","endtime":"0","releasetime":"1679101193","live_speed":"0","live_progress":"0","live_skiptest":"0","type":"5","folder":null,"filetype":[],"statistics":{"learning":0,"unlearned":0,"completed":0,"barrage":0,"question":0,"interactive":0,"watchtime":0,"videoTimeTotal":null},"lessonlink":[],"release":1,"state":-1,"contenttype":"2","index":"0","item_type":1,"activitylabel":"资料","copyright":"0"},{"id":"MDAwMDAwMDAwMLOGuZSGqbdrhN56oQ","courseid":"MDAwMDAwMDAwMLOGx5WH37NthKVyoQ","dirid":[],"createtime":"1679101182","attachment":[{"fileid":"MDAwMDAwMDAwMLOGtd2Gqb-vhN56mA","ext":"https://assets.ketangpai.com/openapiv5/Public/Common/img/fileicon/file_ext_big_pdf.png","ext_s":"https://assets.ketangpai.com/openapiv5/Public/Common/img/fileicon/file_ext_big_pdf.png","ext_type":"pdf","size":"4.57MB","name":"现代交换技术课件(第六章  ATM交换).pdf","url":"https://downloadv5.ketangpai.com/File/download/id/MDAwMDAwMDAwMLOGtd2Gqb-vhN56mA/expires/1683797877/sign/c5e4359078da9414ef5a0ffc542b32f7e299e438/token/eb93f7ac257636809ccb44ce18a9e12a505e593730a66763ee080acf972f72ad/uid/MDAwMDAwMDAwMLScsdyGz79ohctyoQ.html","date":"2022-04-22 10:06","rurl":"https://openapiv5.ketangpai.com/PluginApp/to/id/MDAwMDAwMDAwMLOGtd2Gqb-vhN56mA/expires/1683797877/sign/c5e4359078da9414ef5a0ffc542b32f7e299e438/token/eb93f7ac257636809ccb44ce18a9e12a505e593730a66763ee080acf972f72ad/uid/MDAwMDAwMDAwMLScsdyGz79ohctyoQ.html"}],"sort":"0","candownload":"1","title":"现代交换技术课件(第六章  ATM交换).pdf","status":3,"studyduration":"0","fullscore":"0","endtime":"0","releasetime":"1679101193","live_speed":"0","live_progress":"0","live_skiptest":"0","type":"5","folder":null,"filetype":[],"statistics":{"learning":0,"unlearned":0,"completed":0,"barrage":0,"question":0,"interactive":0,"watchtime":0,"videoTimeTotal":null},"lessonlink":[],"release":1,"state":-1,"contenttype":"2","index":"0","item_type":1,"activitylabel":"资料","copyright":"0"},{"id":"MDAwMDAwMDAwMLOGuZSGqbdrhN52oQ","courseid":"MDAwMDAwMDAwMLOGx5WH37NthKVyoQ","dirid":[],"createtime":"1679101182","attachment":[{"fileid":"MDAwMDAwMDAwMLOGtd6G38lrhd5-3g","ext":"https://assets.ketangpai.com/openapiv5/Public/Common/img/fileicon/file_ext_big_pdf.png","ext_s":"https://assets.ketangpai.com/openapiv5/Public/Common/img/fileicon/file_ext_big_pdf.png","ext_type":"pdf","size":"1.24MB","name":"现代交换技术课件(第七章 宽带综合IP网).pdf","url":"https://downloadv5.ketangpai.com/File/download/id/MDAwMDAwMDAwMLOGtd6G38lrhd5-3g/expires/1683797877/sign/0717b45bddce5278914f0990fdbce2b1ee1d0856/token/eb93f7ac257636809ccb44ce18a9e12a505e593730a66763ee080acf972f72ad/uid/MDAwMDAwMDAwMLScsdyGz79ohctyoQ.html","date":"2022-04-29 09:37","rurl":"https://openapiv5.ketangpai.com/PluginApp/to/id/MDAwMDAwMDAwMLOGtd6G38lrhd5-3g/expires/1683797877/sign/0717b45bddce5278914f0990fdbce2b1ee1d0856/token/eb93f7ac257636809ccb44ce18a9e12a505e593730a66763ee080acf972f72ad/uid/MDAwMDAwMDAwMLScsdyGz79ohctyoQ.html"}],"sort":"0","candownload":"1","title":"现代交换技术课件(第七章 宽带综合IP网).pdf","status":3,"studyduration":"0","fullscore":"0","endtime":"0","releasetime":"1679101193","live_speed":"0","live_progress":"0","live_skiptest":"0","type":"5","folder":null,"filetype":[],"statistics":{"learning":0,"unlearned":0,"completed":0,"barrage":0,"question":0,"interactive":0,"watchtime":0,"videoTimeTotal":null},"lessonlink":[],"release":1,"state":-1,"contenttype":"2","index":"0","item_type":1,"activitylabel":"资料","copyright":"0"},{"id":"MDAwMDAwMDAwMLOGuZSGqbdrhN5-oQ","courseid":"MDAwMDAwMDAwMLOGx5WH37NthKVyoQ","dirid":[],"createtime":"1679101182","attachment":[{"fileid":"MDAwMDAwMDAwMLOGtduH37Nshbh-lQ","ext":"https://assets.ketangpai.com/openapiv5/Public/Common/img/fileicon/file_ext_big_pdf.png","ext_s":"https://assets.ketangpai.com/openapiv5/Public/Common/img/fileicon/file_ext_big_pdf.png","ext_type":"pdf","size":"4.48MB","name":"现代交换技术课件(第五章 分组交换).pdf","url":"https://downloadv5.ketangpai.com/File/download/id/MDAwMDAwMDAwMLOGtduH37Nshbh-lQ/expires/1683797877/sign/9ce2aeecb0e313a3fb9215d9fd47f5ce7ab2192b/token/eb93f7ac257636809ccb44ce18a9e12a505e593730a66763ee080acf972f72ad/uid/MDAwMDAwMDAwMLScsdyGz79ohctyoQ.html","date":"2022-04-15 08:28","rurl":"https://openapiv5.ketangpai.com/PluginApp/to/id/MDAwMDAwMDAwMLOGtduH37Nshbh-lQ/expires/1683797877/sign/9ce2aeecb0e313a3fb9215d9fd47f5ce7ab2192b/token/eb93f7ac257636809ccb44ce18a9e12a505e593730a66763ee080acf972f72ad/uid/MDAwMDAwMDAwMLScsdyGz79ohctyoQ.html"}],"sort":"0","candownload":"1","title":"现代交换技术课件(第五章 分组交换).pdf","status":3,"studyduration":"0","fullscore":"0","endtime":"0","releasetime":"1679101193","live_speed":"0","live_progress":"0","live_skiptest":"0","type":"5","folder":null,"filetype":[],"statistics":{"learning":0,"unlearned":0,"completed":0,"barrage":0,"question":0,"interactive":0,"watchtime":0,"videoTimeTotal":null},"lessonlink":[],"release":1,"state":0,"contenttype":"2","index":"0","item_type":1,"activitylabel":"资料","copyright":"0"}],"count":{"active":12,"directory":0,"classHours":-1,"useTime":-1},"sort":["title.asc"]}}'  # 将JSON数据赋值给json_data变量

data = json.loads(json_data)  # 解析JSON数据为Python字典

rurl_list = []  # 用于存储所有的"rurl"值

# 遍历每个列表项
for item in data["data"]["list"]:
    attachments = item["attachment"]
    # 遍历每个附件
    for attachment in attachments:
        rurl = attachment["rurl"]
        rurl_list.append(rurl)

# 输出所有的"rurl"值
for rurl in rurl_list:
    print(rurl)

运行结果
在这里插入图片描述

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

sucr.

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值