diff --git a/base/custom.conf b/base/custom.conf index ce6fb1b..36d4e04 100644 --- a/base/custom.conf +++ b/base/custom.conf @@ -19,9 +19,9 @@ "quickSearch":0, "filterable":0 }, - { - "key":"hipy_t4_base", - "name":"base(hipy_t4)", + { + "key":"hipy_t4_base_spider", + "name":"base_spider(hipy_t4)", "type":4, "api":"http://192.168.31.49:5707/api/v1/vod/base_spider", "searchable":1, @@ -30,8 +30,8 @@ "ext":"base_spider" }, { - "key": "hipy_t3_base", - "name": "base(hipy_t3)", + "key": "hipy_t3_base_spider", + "name": "base_spider(hipy_t3)", "type": 3, "api": "{{host}}/txt/hipy/base_spider.py", "searchable": 1, @@ -40,26 +40,46 @@ "ext": "{{host}}/txt/hipy/base_spider.json" }, { - "key":"hipy_t4_cctv", - "name":"cctv(hipy_t4)", + "key":"hipy_t4_cntv央视", + "name":"cntv央视(hipy_t4)", "type":4, - "api":"http://192.168.31.49:5707/api/v1/vod/cctv_spider?api_ext={{host}}/txt/hipy/cctv_spider.json", + "api":"http://192.168.31.49:5707/api/v1/vod/cntv央视?api_ext={{host}}/txt/hipy/cntv央视.json", "searchable":1, "quickSearch":0, "filterable":1, - "ext":"cctv_spider", - }, - { - "key": "hipy_t3_cctv", - "name": "cctv(hipy_t3)", + "ext":"cntv央视" + }, + { + "key": "hipy_t3_cntv央视", + "name": "cntv央视(hipy_t3)", "type": 3, - "api": "{{host}}/txt/hipy/cctv_spider.py", + "api": "{{host}}/txt/hipy/cntv央视.py", "searchable": 1, "quickSearch": 0, "filterable": 1, - "ext": "{{host}}/txt/hipy/cctv_spider.json" + "ext": "{{host}}/txt/hipy/cntv央视.json" + }, + { + "key":"hipy_t4_两个BT", + "name":"两个BT(hipy_t4)", + "type":4, + "api":"http://192.168.31.49:5707/api/v1/vod/两个BT?api_ext={{host}}/txt/hipy/两个BT.json", + "searchable":1, + "quickSearch":0, + "filterable":1, + "ext":"两个BT" }, { + "key": "hipy_t3_两个BT", + "name": "两个BT(hipy_t3)", + "type": 3, + "api": "{{host}}/txt/hipy/两个BT.py", + "searchable": 1, + "quickSearch": 0, + "filterable": 1, + "ext": "{{host}}/txt/hipy/两个BT.json" + }, + { "key":"hipy_t4_樱花动漫", "name":"樱花动漫(hipy_t4)", "type":4, @@ -79,16 +99,6 @@ "filterable": 1, "ext": "https://jihulab.com/qiaoji/open/-/raw/main/yinghua" }, - { - "key":"hipy_t4_两个BT", - "name":"两个BT(hipy_t4)", - "type":4, - "api":"http://192.168.31.49:5707/api/v1/vod/两个BT?api_ext={{host}}/txt/hipy/两个BT.json", - "searchable":1, - "quickSearch":0, - "filterable":1, - "ext":"两个BT" - }, {"key":"Test_jsapi","name":"Test_jsapi(drpy)","type":3,"api":"{{host}}/libs/drpy2.min.js","searchable":2,"quickSearch":0,"filterable":0,"ext":"{{host}}/js/jsapi.js","jar":"{{host}}/libs/jar/custom_jsapi.jar"}, # 缓存js diff --git a/base/rules.db b/base/rules.db index b5032f1..0d52779 100644 Binary files a/base/rules.db and b/base/rules.db differ diff --git a/base/直播.txt b/base/直播.txt index 154cff7..affd91f 100644 --- a/base/直播.txt +++ b/base/直播.txt @@ -1,58 +1,64 @@ -📺|定期维护,#genre# -2023-11-22,https://vdse.bdstatic.com//13da18e12728e9d7849f6589a3070b4c.mp4 -海阔道长,https://vd2.bdstatic.com/mda-mhhf5mr00yyhpfjs/1080p/cae_h264/1629284581057661229/mda-mhhf5mr00yyhpfjs.mp4 -🌏|电视频道,#genre# -CCTV1,http://cfss.cc/api/ysp/cctv1.m3u8 -CCTV2,http://cfss.cc/api/ysp/cctv2.m3u8 -CCTV3,http://cfss.cc/api/ysp/cctv3.m3u8 -CCTV4,http://58.220.219.14:9901/tsfile/live/0004_1.m3u8?key=txiptv -CCTV4K,http://cfss.cc/api/ysp/cctv4k.m3u8 -CCTV5,https://node1.olelive.com:6443/live/CCTV5HD/hls.m3u8 -CCTV6,http://cfss.cc/api/ysp/cctv6.m3u8 -CCTV7,https://node1.olelive.com:6443/live/CCTV7HD/hls.m3u8 -CCTV8,http://cfss.cc/api/ysp/cctv8.m3u8 -CCTV9,http://cfss.cc/api/ysp/cctv9.m3u8 -CCTV10,https://node1.olelive.com:6443/live/CCTV10HD/hls.m3u8 -CCTV11,https://iptv.luas.edu.cn/liverespath/3d0aa0f1604f13f0ae90c2dc0590ca22a1bcaaa2/646e868153-0-0-a53121a1df5b93a74d1980270e652878/index.m3u8 -CCTV13,https://live-play.cctvnews.cctv.com/cctv/merge_cctv13.m3u8 -CCTV14,http://cyz32.livehbindex.hbcatv.cn/live/8a22035194884b1eb5515aac434c313c.m3u8?bitrate=2300&pt=5 -CCTV15,http://gxdl-lhs.8866.org:85/tsfile/live/1025_1.m3u8?key=txiptv&playlive=1&authid=0 -CCTV16,http://120.196.232.124:8088/rrs03.hw.gmcc.net/PLTV/651/224/3221226825/1.m3u8 -CCTV17,http://120.196.232.124:8088/rrs03.hw.gmcc.net/PLTV/651/224/3221226660/1.m3u8 -CCTV娱乐,http://line.premiumpowers.net/play/live.php?mac=00:1A:79:73:45:10&extension=ts&stream=156405 -CCTV戏曲,http://line.premiumpowers.net/play/live.php?mac=00:1A:79:73:45:10&extension=ts&stream=156406 -TVB,http://38.64.72.148/hls/modn/list/4005/chunklist1.m3u8 -北京卫视,http://angtv.cc/test/lngd.php?id=083 -黑龙江卫视,http://122.224.153.162:9901/tsfile/live/0143_1.m3u8?key=txiptv -吉林卫视,http://jltpc.x3322.net:9901/tsfile/live/0116_1.m3u8?key=txiptv -辽宁卫视,http://angtv.cc/test/lngd.php?id=058 -河北卫视,http://jltpc.x3322.net:9901/tsfile/live/0117_1.m3u8?key=txiptv -山东卫视,http://[2409:8087:1e03:21::2]:6060/cms001/ch00000090990000001028/index.m3u8 -山西卫视,http://jltpc.x3322.net:9901/tsfile/live/0118_1.m3u8?key=txiptv -天津卫视,http://[2409:8087:1e03:21::2]:6060/cms001/ch00000090990000001036/index.m3u8 -江苏卫视,http://cfss.cc/api/ysp/jsws.m3u8 -安徽卫视,http://[2409:8087:1e03:21::2]:6060/cms001/ch00000090990000001037/index.m3u8 -江西卫视,http://[2409:8087:1e03:21::2]:6060/cms001/ch00000090990000001034/index.m3u8 -浙江卫视,http://hw-m-l.cztv.com/channels/lantian/channel01/1080p.m3u8 -东方卫视,http://cfss.cc/api/ysp/dfws.m3u8 -河南卫视,http://[2409:8087:1e03:21::2]:6060/cms001/ch00000090990000001222/index.m3u8 -湖北卫视,https://iptv.luas.edu.cn/liverespath/a8e4cf2bade25844b998d7743d83331412ea841f/09ef2cf7aa-0-0-41178ff5e45faa352937baadccc115df/index.m3u8 -湖南卫视,http://120.196.232.124:8088/rrs03.hw.gmcc.net/PLTV/651/224/3221226698/1.m3u8 -东南卫视,http://[2409:8087:1e03:21::2]:6060/cms001/ch00000090990000001201/index.m3u8 -广东卫视,http://cfss.cc/api/ysp/gdws.m3u8 -广西卫视,http://live.gxrb.com.cn/tv/gxtvlive03/index.m3u8 -海南卫视,http://[2409:8087:1e03:21::2]:6060/cms001/ch00000090990000001183/index.m3u8 -云南卫视,http://[2409:8087:1e03:21::2]:6060/cms001/ch00000090990000001223/index.m3u8 -贵州卫视,http://[2409:8087:1e03:21::2]:6060/cms001/ch00000090990000001184/index.m3u8 -重庆卫视,http://[2409:8087:1e03:21::2]:6060/cms001/ch00000090990000001129/index.m3u8 -四川卫视,http://[2409:8087:1e03:21::2]:6060/cms001/ch00000090990000001130/index.m3u8 -西藏卫视,http://[2409:8087:1e03:21::2]:6060/cms001/ch00000090990000001072/index.m3u8 -青海卫视,http://[2409:8087:1e03:21::2]:6060/cms001/ch00000090990000001082/index.m3u8 -新疆卫视,http://[2409:8087:1e03:21::2]:6060/cms001/ch00000090990000001065/index.m3u8 -甘肃卫视,http://[2409:8087:1e03:21::2]:6060/cms001/ch00000090990000001298/index.m3u8 -宁夏卫视,http://hls.live.cqccn.com/__cl/cg:live/__c/ningxia/__op/default/__f/index.m3u8 -陕西卫视,http://[2409:8087:1e03:21::2]:6060/cms001/ch00000090990000001067/index.m3u8 -内蒙古卫视,http://222.175.159.226:808/hls/202366/index.m3u8 -凤凰卫视,http://113.117.74.28:8081/hls/37/index.m3u8 -凤凰资讯,http://[2409:8087:2001:20:2800:0:df6e:eb27]:80/wh7f454c46tw1890984412_1778241929/ott.mobaibox.com/PLTV/3/224/3221228524/index.m3u8?icpid=3&RTS=1674373416&from=40&popid=40&hms_devid=2293&prioritypopid=40&vqe=3 +📺|定期维护,#genre# +2023-11-23,https://vdse.bdstatic.com//13da18e12728e9d7849f6589a3070b4c.mp4 +海阔道长,https://vd2.bdstatic.com/mda-mhhf5mr00yyhpfjs/1080p/cae_h264/1629284581057661229/mda-mhhf5mr00yyhpfjs.mp4 +🌏|电视频道,#genre# +CCTV1,http://angtv.cc/test/lngd.php?id=488 +CCTV2,https://node1.olelive.com:6443/live/CCTV2HD/hls.m3u8 +CCTV3,https://iptv.luas.edu.cn/liverespath/f76f9947c68be18d7a456e25aa59a08c5747e6a5/0df24da9ec-0-0-dca40ddadd2a051ce1a83536d9310820/index.m3u8 +CCTV4,http://cfss.cc/api/ysp/cctv4.m3u8 +CCTV4K,http://cfss.cc/api/ysp/cctv4k.m3u8 +CCTV5,https://node1.olelive.com:6443/live/CCTV5HD/hls.m3u8 +CCTV6,http://cfss.cc/api/ysp/cctv6.m3u8 +CCTV7,http://49.235.110.121:9090/898/peda/bestv.php?id=cctv7hd8m/8000000 +CCTV8,https://node1.olelive.com:6443/live/CCTV8HD/hls.m3u8 +CCTV9,http://cfss.cc/api/ysp/cctv9.m3u8 +CCTV10,http://cfss.cc/api/ysp/cctv10.m3u8 +CCTV11,http://cfss.cc/api/ysp/cctv11.m3u8 +CCTV12,http://cfss.cc/ds/bst.php?id=Cf-13 +CCTV13,https://live-play.cctvnews.cctv.com/cctv/merge_cctv13.m3u8 +CCTV14,http://cyz32.livehbindex.hbcatv.cn/live/8a22035194884b1eb5515aac434c313c.m3u8?bitrate=2300&pt=5 +CCTV15,http://cfss.cc/api/ysp/cctv15.m3u8 +CCTV16,http://120.196.232.124:8088/rrs03.hw.gmcc.net/PLTV/651/224/3221226825/1.m3u8 +CCTV17,http://120.196.232.124:8088/rrs03.hw.gmcc.net/PLTV/651/224/3221226727/1.m3u8 +CCTV娱乐,http://line.premiumpowers.net/play/live.php?mac=00:1A:79:73:45:10&extension=ts&stream=156405 +CCTV戏曲,http://line.premiumpowers.net/play/live.php?mac=00:1A:79:73:45:10&extension=ts&stream=156406 +TVB,http://38.64.72.148:80/hls/modn/list/4005/chunklist0.m3u8 +五星体育,https://live.goodiptv.club/api/bestv.php?id=wxtyhd8m/8000000 +咪咕体育,http://[2409:8087:1a01:df::4077]/PLTV/88888888/224/3221225895/index.m3u8 +纬来体育,http://198.16.100.90:8278/videolandsport/playlist.m3u8?tid=MA6A1192684511926845&ct=19226&tsum=0b7ca9a61e7371df68108a27dc358c68 +超级体育,http://[2409:8087:1a01:df::7005]:80/ottrrs.hl.chinamobile.com/PLTV/88888888/224/3221225715/index.m3u8 +精品体育,http://[2409:8087:2001:20:2800:0:df6e:eb1b]:80/wh7f454c46tw2797725038_-2054878207/ott.mobaibox.com/PLTV/3/224/3221227615/index.m3u8 +北京卫视,http://120.196.232.124:8088/rrs03.hw.gmcc.net/PLTV/651/224/3221226719/1.m3u8 +黑龙江卫视,http://122.224.153.162:9901/tsfile/live/0143_1.m3u8?key=txiptv +吉林卫视,http://jltpc.x3322.net:9901/tsfile/live/0116_1.m3u8?key=txiptv +辽宁卫视,https://iptv.luas.edu.cn/liverespath/73aedb8ffd21b3b8afe4664591d4cb3a5cced827/bdc834c533-0-0-aefef0ed39d19073554f1c7e80a25cbc/index.m3u8 +河北卫视,http://jltpc.x3322.net:9901/tsfile/live/0117_1.m3u8?key=txiptv +山东卫视,https://iptv.luas.edu.cn/liverespath/8b205af319dcc92c60a69a96423af21b24a29ca0/dd6f0a43db-0-0-63f6f29dcc6843fd6b50323d4bfc8b09/index.m3u8 +山西卫视,http://218.17.196.234:9901/tsfile/live/0118_1.m3u8 +天津卫视,http://120.196.232.124:8088/rrs03.hw.gmcc.net/PLTV/651/224/3221226686/1.m3u8 +江苏卫视,https://iptv.luas.edu.cn/liverespath/0be64515076e489456de2f33e7b58ff1b392d3b3/8c0352e42d-0-0-2529f61c8f420136013f1ab8a93169c3/index.m3u8 +安徽卫视,https://iptv.luas.edu.cn/liverespath/6e91e17de838dbf7c77f9ed8e41726bd4a1516f5/494a63d492-0-0-94541fa104bd30ce82410455ab950402/index.m3u8 +江西卫视,http://[2409:8087:1e03:21::2]:6060/cms001/ch00000090990000001034/index.m3u8 +浙江卫视,http://hw-m-l.cztv.com/channels/lantian/channel01/1080p.m3u8 +东方卫视,https://iptv.luas.edu.cn/liverespath/4015e6015b3b818a4cbc2247960b8536a3cd0153/0bc51b40df-0-0-23a64a0dc546104d1ba498a41ff49540/index.m3u8 +河南卫视,http://angtv.cc/test/lngd.php?id=339 +湖北卫视,http://113.100.193.10:9901/tsfile/live/0132_1.m3u8 +湖南卫视,http://jltpc.x3322.net:9901/tsfile/live/0117_2.m3u8?key=txiptv +东南卫视,http://[2409:8087:1e03:21::2]:6060/cms001/ch00000090990000001201/index.m3u8 +广东卫视,https://iptv.luas.edu.cn/liverespath/57e80ee85ec1f4e523e1bca55f5a676abd292db8/0ff9a42344-0-0-0eb4f8fe53cdbc02d1db696ecc425752/index.m3u8 +广东体育,http://gxdl-lhs.8866.org:85/tsfile/live/1001_1.m3u8?key=txiptv&playlive=1&authid=0 +广西卫视,http://live.gxrb.com.cn/tv/gxtvlive03/index.m3u8 +海南卫视,http://[2409:8087:1e03:21::2]:6060/cms001/ch00000090990000001183/index.m3u8 +云南卫视,https://iptv.luas.edu.cn/liverespath/d45a277ca433670e3f463b497783af19bb2c63f8/3f1dcf4cf3-0-0-3f0618b5bab73c0ebb1be6c66ccbf65d/index.m3u8 +贵州卫视,http://[2409:8087:1e03:21::2]:6060/cms001/ch00000090990000001184/index.m3u8 +重庆卫视,https://iptv.luas.edu.cn/liverespath/b14734af7f740eb61419248c57e25551a7d1093f/5255a86445-0-0-4ce4f2e82145e9bc39b5b4ccd7cce4a0/index.m3u8 +四川卫视,https://iptv.luas.edu.cn/liverespath/ca3f021632b48e6960797776657926074723d276/027c826f0e-0-0-4caf8e44f0157ea591d8857569b9a2c3/index.m3u8 +西藏卫视,http://zteres.sn.chinamobile.com:6060/000000001000/1000000002000015894/1.m3u8?channel-id=ystenlive&Contentid=1000000002000015894&livemode=1&stbId=3 +青海卫视,http://stream.qhbtv.com/qhws/playlist.m3u8 +新疆卫视,http://zteres.sn.chinamobile.com:6060/000000001000/1000000002000029441/1.m3u8?channel-id=ystenlive&Contentid=1000000002000029441&livemode=1&stbId=3 +甘肃卫视,https://iptv.luas.edu.cn/liverespath/975463fd39229112f75925af024d6ed11de84a0e/d46f4f77ca-0-0-3b64a6fd708d6eeeb0e60461ad736b78/index.m3u8 +宁夏卫视,http://[2409:8087:1e03:21::2]:6060/cms001/ch00000090990000001074/index.m3u8 +陕西卫视,https://iptv.luas.edu.cn/liverespath/ebc9ec3e297c071df95d759b6313b9d9dbc3dbda/ef6e859417-0-0-62a8314666ead4b1cf49536375036d60/index.m3u8 +内蒙古卫视,http://222.175.159.226:808/hls/202366/index.m3u8 +凤凰资讯,http://50.7.238.114:8278/phoenixinfo_hd/playlist.m3u8?tid=m7f4a830029be&ct=18336&tsum=74f57bddc0725f74838380086dce3e44 翡翠台,https://sc2022.stream-link.org/tv2306.php?id=h02&checkedby:iptvcat.com \ No newline at end of file diff --git a/js/version.txt b/js/version.txt index 71953ca..857a649 100644 --- a/js/version.txt +++ b/js/version.txt @@ -1 +1 @@ -3.9.49beta18 \ No newline at end of file +3.9.49beta19 \ No newline at end of file diff --git a/txt/hipy/base_spider.py b/txt/hipy/base_spider.py index ca6dec5..83ea4ee 100644 --- a/txt/hipy/base_spider.py +++ b/txt/hipy/base_spider.py @@ -28,22 +28,22 @@ from urllib.parse import quote t4的配置里ext节点会自动变成api对应query参数extend,但t4的ext字符串不支持路径格式,比如./开头或者.json结尾 api里会自动含有ext参数是base64编码后的选中的筛选条件 { - "key":"hipy_t4_base", - "name":"base(hipy_t4)", + "key":"hipy_t4_base_spider", + "name":"base_spider(hipy_t4)", "type":4, "api":"http://192.168.31.49:5707/api/v1/vod/base_spider", "searchable":1, - "quickSearch":1, + "quickSearch":0, "filterable":1, "ext":"base_spider" }, { - "key": "hipy_t3_base", - "name": "base(hipy_t3)", + "key": "hipy_t3_base_spider", + "name": "base_spider(hipy_t3)", "type": 3, "api": "{{host}}/txt/hipy/base_spider.py", "searchable": 1, - "quickSearch": 1, + "quickSearch": 0, "filterable": 1, "ext": "{{host}}/txt/hipy/base_spider.json" }, @@ -379,6 +379,7 @@ class Spider(BaseSpider): # 元类 默认的元类 type if __name__ == '__main__': spider = Spider() spider.init() - spider.init_api_ext_file() # 生成筛选对应的json文件 - - spider.searchContent('斗罗大陆') + # spider.init_api_ext_file() # 生成筛选对应的json文件 + spider.log({'key': 'value'}) + spider.log('====文本内容====') + # spider.searchContent('斗罗大陆') diff --git a/txt/hipy/cctv_spider.json b/txt/hipy/cntv央视.json similarity index 100% rename from txt/hipy/cctv_spider.json rename to txt/hipy/cntv央视.json diff --git a/txt/hipy/cctv_spider.py b/txt/hipy/cntv央视.py similarity index 92% rename from txt/hipy/cctv_spider.py rename to txt/hipy/cntv央视.py index 3271902..2962172 100644 --- a/txt/hipy/cctv_spider.py +++ b/txt/hipy/cntv央视.py @@ -25,37 +25,36 @@ api里会自动含有ext参数是base64编码后的选中的筛选条件 错误示例,ext含有json: { - "key":"hipy_cctv", - "name":"hipy_cctv", + "key":"hipy_cntv央视", + "name":"cntv央视(hipy_t4)", "type":4, - "api":"http://192.168.31.49:5707/api/v1/vod/cctv_spider?api_ext={{host}}/txt/hipy/cctv_spider.json", + "api":"http://192.168.31.49:5707/api/v1/vod/cntv央视?api_ext={{host}}/txt/hipy/cntv央视.json", "searchable":1, "quickSearch":1, - "filterable":1, - "ext":"cctv_spider.json" + "filterable":0, + "ext":"cntv央视.json" } 正确示例。同时存在ext和api_ext会优先取ext作为extend加载init { - "key":"hipy_t4_cctv", - "name":"cctv(hipy_t4)", + "key":"hipy_t4_cntv央视", + "name":"cntv央视(hipy_t4)", "type":4, - "api":"http://192.168.31.49:5707/api/v1/vod/cctv_spider?api_ext={{host}}/txt/hipy/cctv_spider.json", + "api":"http://192.168.31.49:5707/api/v1/vod/cntv央视?api_ext={{host}}/txt/hipy/cntv央视.json", "searchable":1, - "quickSearch":1, + "quickSearch":0, "filterable":1, - "ext":"cctv_spider" - } - + "ext":"cntv央视" + }, { - "key": "hipy_t3_cctv", - "name": "cctv(hipy_t3)", + "key": "hipy_t3_cntv央视", + "name": "cntv央视(hipy_t3)", "type": 3, - "api": "{{host}}/txt/hipy/cctv_spider.py", + "api": "{{host}}/txt/hipy/cntv央视.py", "searchable": 1, - "quickSearch": 1, + "quickSearch": 0, "filterable": 1, - "ext": "{{host}}/txt/hipy/cctv_spider.json" -} + "ext": "{{host}}/txt/hipy/cntv央视.json" +}, """ @@ -246,6 +245,7 @@ class Spider(BaseSpider): # 元类 默认的元类 type def homeContent(self, filter): result = {} cateManual = { + "4K专区": "4K专区", "栏目大全": "栏目大全", "特别节目": "特别节目", "纪录片": "纪录片", @@ -335,6 +335,11 @@ class Spider(BaseSpider): # 元类 默认的元类 type url = 'https://api.cntv.cn/lanmu/columnSearch?&fl={0}&fc={1}&cid={2}&p={3}&n=20&serviceId=tvcctv&t=json&cb=ko'.format( fl, fc, cid, pg) pagecount = 20 + elif tid == '4K专区': + cid = 'CHAL1558416868484111' + url = 'https://api.cntv.cn/NewVideo/getLastVideoList4K?serviceId=cctv4k&cid={0}&p={1}&n={2}&t=json&cb=ko'.format( + cid,pg,pagecount + ) else: url = 'https://tv.cctv.com/epg/index.shtml' @@ -345,6 +350,12 @@ class Spider(BaseSpider): # 元类 默认的元类 type if index > -1: htmlText = htmlText[3:index] videos = self.get_list1(html=htmlText, tid=tid) + elif tid == '4K专区': + index = htmlText.rfind(');') + if index > -1: + htmlText = htmlText[3:index] + videos = self.get_list_4k(html=htmlText, tid=tid) + else: videos = self.get_list(html=htmlText, tid=tid) # print(videos) @@ -378,6 +389,9 @@ class Spider(BaseSpider): # 元类 默认的元类 type topicId) # htmlTxt = self.webReadFile(urlStr=Url, header=self.header) htmlTxt = self.fetch(Url).text + elif tid == "4K专区": + Url = 'https://api.cntv.cn/NewVideo/getVideoListByAlbumIdNew?id={0}&serviceId=cctv4k&p=1&n=100&mode=0&pub=1'.format(id) + print(Url) else: Url = 'https://api.cntv.cn/NewVideo/getVideoListByAlbumIdNew?id={0}&serviceId=tvcctv&p=1&n=100&mode=0&pub=1'.format( id) @@ -397,7 +411,7 @@ class Spider(BaseSpider): # 元类 默认的元类 type if len(videoList) < 1: # htmlTxt = self.webReadFile(urlStr=lastVideo, header=self.header) htmlTxt = self.fetch(lastVideo).text - if tid == "电视剧" or tid == "纪录片": + if tid == "电视剧" or tid == "纪录片" or tid == "4K专区": patternTxt = r"'title':\s*'(?P