https://koudaistory.com/resource/audio/12276?channel=xgstsg&refer=relaterecommend https://koudaistory.com/resource/audio/12277?channel=xgstsg&refer=relaterecommend
Created
July 27, 2022 15:04
-
-
Save i-sync/6d71452a68eaebc8ec26cc79383cc975 to your computer and use it in GitHub Desktop.
纳尼亚传奇 完整7部广播剧版
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"name": "纳尼亚传奇1 狮子女巫魔衣橱", | |
"list": [ | |
{ | |
"name": "片花", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/g8pelc2n.audio" | |
}, | |
{ | |
"name": "第一章 露茜初探衣柜", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/zph8w4ii.audio" | |
}, | |
{ | |
"name": "第二章 露茜看到了什么", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/rfhipayt.audio" | |
}, | |
{ | |
"name": "第三章 爱德蒙和衣橱", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/guqifnc4.audio" | |
}, | |
{ | |
"name": "第四章 土耳其软糖", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/hawyxj4t.audio" | |
}, | |
{ | |
"name": "第五章 回到厨门这边", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/zgbobqsh.audio" | |
}, | |
{ | |
"name": "第六章 进入森林", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/s74ovui2.audio" | |
}, | |
{ | |
"name": "第七章 海狸家的一天", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/2tvd2ujl.audio" | |
}, | |
{ | |
"name": "第八章 饭后发送的情况", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/iy7gpho.audio" | |
}, | |
{ | |
"name": "第九章 女巫的房子", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/ajyinxbq.audio" | |
}, | |
{ | |
"name": "第十章 魔法开始破了", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/7jeksrry.audio" | |
}, | |
{ | |
"name": "第十一章 阿斯兰快到了", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/cn8kw9ws.audio" | |
}, | |
{ | |
"name": "第十二章 彼得初战告捷", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/12bi8e7y.audio" | |
}, | |
{ | |
"name": "第十三章 远古时代的高深魔法", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/1idr7w43.audio" | |
}, | |
{ | |
"name": "第十四章 女巫的胜利", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/3jnrp641.audio" | |
}, | |
{ | |
"name": "第十五章 太古时代更加高深的魔法", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/cm5b8sly.audio" | |
}, | |
{ | |
"name": "第十六章 石像的遭遇", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/qxa15cq6.audio" | |
}, | |
{ | |
"name": "第十七章 追猎白鹿", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/k23ugd2j.audio" | |
} | |
] | |
}, | |
{ | |
"name": "纳尼亚传奇2 凯斯宾王子", | |
"list": [ | |
{ | |
"name": "片花", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/1fb9rpr0.audio" | |
}, | |
{ | |
"name": "第一章 小岛", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/24wztr05.audio" | |
}, | |
{ | |
"name": "第二章 古老的宝库", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/1ivl7is0.audio" | |
}, | |
{ | |
"name": "第三章 小矮人", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/yfugldxo.audio" | |
}, | |
{ | |
"name": "第四章 凯斯宾王子的故事 上", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/otq16duk.audio" | |
}, | |
{ | |
"name": "第五章 凯斯宾王子的故事 下", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/mqdgk8nc.audio" | |
}, | |
{ | |
"name": "第六章 凯斯宾深山探险 上", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/fsq8hd9j.audio" | |
}, | |
{ | |
"name": "第七章 凯斯宾深山探险 下", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/9rivuogj.audio" | |
}, | |
{ | |
"name": "第八章 隐居者", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/r0fl3dji.audio" | |
}, | |
{ | |
"name": "第九章 危险笼罩着古老的纳尼亚 上", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/j7xvb1qe.audio" | |
}, | |
{ | |
"name": "第十章 危险笼罩着古老的纳尼亚 下", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/pkibi7kh.audio" | |
}, | |
{ | |
"name": "第十一章 号角的魔力 上", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/v7u9gn3j.audio" | |
}, | |
{ | |
"name": "第十二章 号角的魔力 下", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/42wtytny.audio" | |
}, | |
{ | |
"name": "第十三章 露茜看到了什么 上", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/amtfpq1f.audio" | |
}, | |
{ | |
"name": "第十四章 露茜看到了什么 下", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/afknioc2.audio" | |
}, | |
{ | |
"name": "第十五章 狮王归来 上", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/4nu94fdk.audio" | |
}, | |
{ | |
"name": "第十六章 狮王归来 下", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/1z7jwjvy.audio" | |
}, | |
{ | |
"name": "第十七章 雄狮长啸", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/89uv8gp6.audio" | |
}, | |
{ | |
"name": "第十八章 反叛", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/jq3vwxe4.audio" | |
}, | |
{ | |
"name": "第十九章 决斗", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/yuuxeuht.audio" | |
}, | |
{ | |
"name": "第二十章 解放", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/r793vifu.audio" | |
}, | |
{ | |
"name": "第二十一章 阿斯兰打开一道天门", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/v2pskiha.audio" | |
} | |
] | |
}, | |
{ | |
"name": "纳尼亚传奇3 黎明踏浪号", | |
"list": [ | |
{ | |
"name": "片花", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/vnn5wiei.audio" | |
}, | |
{ | |
"name": "第一章 卧室里的画", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/5v7275rp.audio" | |
}, | |
{ | |
"name": "第二章 在黎明踏浪号", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/6lgw3mfv.audio" | |
}, | |
{ | |
"name": "第三章 孤独的岛", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/mrh6e55r.audio" | |
}, | |
{ | |
"name": "第四章 凯斯宾巧施奇迹", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/347jtkyd.audio" | |
}, | |
{ | |
"name": "第五章 风暴的余波", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/crvfpaq9.audio" | |
}, | |
{ | |
"name": "第六章 尤斯塔斯的历险 上", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/zm75pe5p.audio" | |
}, | |
{ | |
"name": "第七章 尤斯塔斯的历险 下", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/z6tije7v.audio" | |
}, | |
{ | |
"name": "第八章 脱险", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/t25cshwq.audio" | |
}, | |
{ | |
"name": "第九章 两次死里逃生 上", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/45frolbn.audio" | |
}, | |
{ | |
"name": "第十章 两次死里逃生 下", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/4uiz6of3.audio" | |
}, | |
{ | |
"name": "第十一章 声音岛", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/2qf93bec.audio" | |
}, | |
{ | |
"name": "第十二章 魔法书", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/fewkcq00.audio" | |
}, | |
{ | |
"name": "第十三章 独角怪欢天喜地", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/y7jxcwkk.audio" | |
}, | |
{ | |
"name": "第十四章 噩梦岛", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/33ngm2j6.audio" | |
}, | |
{ | |
"name": "第十五章 三个沉睡的公爵", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/4efy4gsd.audio" | |
}, | |
{ | |
"name": "第十六章 世界尽头的起点", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/642fopaa.audio" | |
}, | |
{ | |
"name": "第十七章 最后的海上奇观", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/g48jnqvl.audio" | |
}, | |
{ | |
"name": "第十八章 真正的世界尽头 上", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/3e0jworw.audio" | |
}, | |
{ | |
"name": "第十九章 真正的世界尽头 下", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/qe1gccsc.audio" | |
} | |
] | |
}, | |
{ | |
"name": "纳尼亚传奇4 银椅", | |
"list": [ | |
{ | |
"name": "片花", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/jeedbxsa.audio" | |
}, | |
{ | |
"name": "第1章 在体育馆后面", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/w0wbrik3.audio" | |
}, | |
{ | |
"name": "第2章 吉尔接受任务", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/zy0r6h3c.audio" | |
}, | |
{ | |
"name": "第3章 国王启航", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/96str3as.audio" | |
}, | |
{ | |
"name": "第4章 猫头鹰的会议", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/tdpek7d6.audio" | |
}, | |
{ | |
"name": "第5章 普德格伦", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/9cup4eju.audio" | |
}, | |
{ | |
"name": "第6章 北方的荒原(上)", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/7uxund7j.audio" | |
}, | |
{ | |
"name": "第7章 北方的荒原(下)", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/ski4umte.audio" | |
}, | |
{ | |
"name": "第8章 哈方宫", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/zv5cp7c6.audio" | |
}, | |
{ | |
"name": "第9章 真相大白", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/yvpnsgt1.audio" | |
}, | |
{ | |
"name": "第10章 不见太阳的旅行(上)", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/hfbaw9ic.audio" | |
}, | |
{ | |
"name": "第11章 不见太阳的旅行(下)", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/l52ghatl.audio" | |
}, | |
{ | |
"name": "第12章 在黑暗的城堡", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/7w9iy0qa.audio" | |
}, | |
{ | |
"name": "第13章 地下世界的女王", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/zio8dudl.audio" | |
}, | |
{ | |
"name": "第14章 没有女王的底下世界", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/rz9b2pdk.audio" | |
}, | |
{ | |
"name": "第15章 世界底层", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/5106gy3w.audio" | |
}, | |
{ | |
"name": "第16章 吉尔不见了", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/1yau02xu.audio" | |
}, | |
{ | |
"name": "第17章 皆大欢喜", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/uvl1l7v5.audio" | |
} | |
] | |
}, | |
{ | |
"name": "纳尼亚传奇5 能言马与男孩", | |
"list": [ | |
{ | |
"name": "片花", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/smnl7x8p.audio" | |
}, | |
{ | |
"name": "第1章 沙斯塔出奔(上)", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/u8z7h7x7.audio" | |
}, | |
{ | |
"name": "第2章 沙斯塔出奔(下)", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/y4iqbsx7.audio" | |
}, | |
{ | |
"name": "第3章 道旁遇险(上)", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/ais7ze5j.audio" | |
}, | |
{ | |
"name": "第4章 道旁遇险(下)", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/74h48ilf.audio" | |
}, | |
{ | |
"name": "第5章 在塔什班城门口", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/erz8t495.audio" | |
}, | |
{ | |
"name": "第6章 沙斯塔碰上了纳尼亚人(上)", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/8tg2a7b0.audio" | |
}, | |
{ | |
"name": "第7章 沙斯塔碰上了纳尼亚人(下)", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/5q430q46.audio" | |
}, | |
{ | |
"name": "第8章 科林王子", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/q8bj9687.audio" | |
}, | |
{ | |
"name": "第9章 沙斯塔在坟场", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/7cp7y47k.audio" | |
}, | |
{ | |
"name": "第10章 阿拉维斯在塔什班城", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/22fvjkqp.audio" | |
}, | |
{ | |
"name": "第11章 在蒂斯洛克的城堡里(上)", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/uoq3krb1.audio" | |
}, | |
{ | |
"name": "第12章 在蒂斯洛克的城堡里(下)", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/3abi6967.audio" | |
}, | |
{ | |
"name": "第13章 穿越大沙漠", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/keb5shs9.audio" | |
}, | |
{ | |
"name": "第14章 南征隐士", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/1q3ddbwr.audio" | |
}, | |
{ | |
"name": "第15章 不受欢迎的同路人(上)", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/qprk4qaf.audio" | |
}, | |
{ | |
"name": "第16章 不受欢迎的同路人(下)", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/qwghzuf8.audio" | |
}, | |
{ | |
"name": "第17章 沙斯塔在纳尼亚", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/j4yhcp9b.audio" | |
}, | |
{ | |
"name": "第18章 安瓦德之战", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/julq2n1y.audio" | |
}, | |
{ | |
"name": "第19章 布里怎样变成一匹聪明的马", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/gebsnfrg.audio" | |
}, | |
{ | |
"name": "第20章 可笑的拉巴达什", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/5s24l2hw.audio" | |
} | |
] | |
}, | |
{ | |
"name": "纳尼亚传奇6 魔法师的外甥", | |
"list": [ | |
{ | |
"name": "片花", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/2qyzf555.audio" | |
}, | |
{ | |
"name": "第1章 开错的门", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/xnpbfelz.audio" | |
}, | |
{ | |
"name": "第2章 迪格雷和他的舅舅", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/mdz82msx.audio" | |
}, | |
{ | |
"name": "第3章 各个世界之间的树林", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/vij51lgy.audio" | |
}, | |
{ | |
"name": "第4章 钟与锤", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/4kdwi9pv.audio" | |
}, | |
{ | |
"name": "第5章 灭绝咒", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/fcixzvcd.audio" | |
}, | |
{ | |
"name": "第6章 安德鲁舅舅的麻烦开始了", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/wajktp36.audio" | |
}, | |
{ | |
"name": "第7章 发生在门前的事", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/z7cyc28r.audio" | |
}, | |
{ | |
"name": "第8章 灯柱前的战斗", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/f38m9rze.audio" | |
}, | |
{ | |
"name": "第9章 纳尼亚的诞生", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/hec7skch.audio" | |
}, | |
{ | |
"name": "第10章 第一个笑柄及其他", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/xpbd2wuq.audio" | |
}, | |
{ | |
"name": "第11章 迪格雷和他的舅舅又陷困境", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/97hzdrtm.audio" | |
}, | |
{ | |
"name": "第12章 草莓远征", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/g8e9pzeq.audio" | |
}, | |
{ | |
"name": "第13章 不期而遇", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/8lcp6iqj.audio" | |
}, | |
{ | |
"name": "第14章 栽树", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/pszbildx.audio" | |
}, | |
{ | |
"name": "第15章 故事的结束及其他故事的开始", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/4uu8ddcq.audio" | |
} | |
] | |
}, | |
{ | |
"name": "纳尼亚传奇7 最后一战", | |
"list": [ | |
{ | |
"name": "片花", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/cv2iysi7.audio" | |
}, | |
{ | |
"name": "第1章 大锅深渊", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/ypizsd77.audio" | |
}, | |
{ | |
"name": "第2章 国王的鲁莽", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/4a7p8atn.audio" | |
}, | |
{ | |
"name": "第3章 无尾猿烜赫一时", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/ecaxlp94.audio" | |
}, | |
{ | |
"name": "第4章 夜里发生的事", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/cl5sp317.audio" | |
}, | |
{ | |
"name": "第5章 救援国王", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/99n54gv3.audio" | |
}, | |
{ | |
"name": "第6章 成功的逆袭", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/12bh504u.audio" | |
}, | |
{ | |
"name": "第7章 关于小矮人", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/8a1ogsfo.audio" | |
}, | |
{ | |
"name": "第8章 老鹰带来的消息", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/6yaeb2dw.audio" | |
}, | |
{ | |
"name": "第9章 马厩山的集会", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/eap153ko.audio" | |
}, | |
{ | |
"name": "第10章 谁将入马厩", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/2cle3sic.audio" | |
}, | |
{ | |
"name": "第11章 步伐加快了", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/1wsv2bye.audio" | |
}, | |
{ | |
"name": "第12章 穿过马厩的门", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/6wipy99c.audio" | |
}, | |
{ | |
"name": "第13章 小矮人的拒绝", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/w7y7dm2t.audio" | |
}, | |
{ | |
"name": "第14章 黑夜笼罩纳尼亚", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/kntys223.audio" | |
}, | |
{ | |
"name": "第15章 更高深的路", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/cb2gatrc.audio" | |
}, | |
{ | |
"name": "第16章 告别幻影世界", | |
"url": "https://7n-cdn-open.idaddy.cn/a/0/v2cd8uj1.audio" | |
} | |
] | |
} | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import json | |
import os | |
import requests | |
def download_file(url): | |
headers = { | |
"User-Agent":"Mozilla/5.0 (Linux; Android 8.0.0; SM-G955U Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Mobile Safari/537.36" | |
} | |
if url is None: | |
return url | |
res = requests.get(url, headers=headers) | |
if res.status_code != requests.codes.ok: | |
print("Error, status code: ", res.status_code) | |
return None | |
return res.content | |
def write_file(file_name, file_content): | |
if os.path.exists(file_name): | |
os.remove(file_name) | |
with open(file_name, 'wb') as f: | |
f.write(file_content) | |
if __name__ == "__main__": | |
with open ("up.json", 'r+', encoding='utf-8') as f: | |
json_data = json.load(f) | |
for data in json_data: | |
name = data["name"] | |
if not os.path.exists(name): | |
os.mkdir(name) | |
for index, item in enumerate(data["list"]): | |
#print(item["name"], index) | |
file_name = f"{name}/{index:0>2}.{item['name']}.mp3" | |
if os.path.exists(file_name): | |
print("file exists, skip ", file_name) | |
continue | |
url = item["url"].strip() | |
print(file_name, item["url"]) | |
file_content = download_file(url) | |
#check if download success | |
if file_content is None: | |
print(file_name, "download failed...") | |
else: | |
print("file downloaded,", file_name) | |
write_file(file_name, file_content) | |
time.sleep(10) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment