Giter Site home page Giter Site logo

evilcult / iptv-m3u-maker Goto Github PK

View Code? Open in Web Editor NEW
2.7K 113.0 472.0 727 KB

IPTV 国内+国外 电视台直播源m3u文件, 收集&汇总&本地源脚本

Home Page: https://evilcult.dev/tags/IPTV-Projects/

License: MIT License

Python 25.60% HTML 74.40%
iptv m3u python m3u8-playlist tv

iptv-m3u-maker's Issues

超时错误

tools.py,51行加了个timeout的捕获,避免了超时的时候导致无法运行,没怎么写过python,不知道加的对不对
except socket.timeout as toe:
header = toe.headers
body = toe.read().decode('utf-8')
code = toe.code

抓取频道报错

[iptv-m3u-maker] python main.py master
Checking[ 1 / 141 ]: CCTV-1综合
Checking[ 2 / 141 ]: CCTV-2财经
Checking[ 3 / 141 ]: CCTV-3综艺
Checking[ 4 / 141 ]: CCTV-4中文国际
Checking[ 5 / 141 ]: CCTV-5体育
Checking[ 6 / 141 ]: CCTV-5++体育赛事
Checking[ 7 / 141 ]: CCTV-6电影
Checking[ 8 / 141 ]: CCTV-7军事农业
Checking[ 9 / 141 ]: CCTV-8电视剧
Checking[ 10 / 141 ]: CCTV-9记录
Checking[ 11 / 141 ]: CCTV-10科教
Checking[ 12 / 141 ]: CCTV-11戏曲
Checking[ 13 / 141 ]: CCTV-12社会与法
Checking[ 14 / 141 ]: CCTV-13新闻
Checking[ 15 / 141 ]: CCTV-14少儿
Checking[ 16 / 141 ]: CCTV-15音乐
Checking[ 17 / 141 ]: 湖南卫视高清
Checking[ 18 / 141 ]: 江苏卫视高清
Checking[ 19 / 141 ]: 浙江卫视高清
Checking[ 20 / 141 ]: 东方卫视高清
Checking[ 21 / 141 ]: 北京卫视高清
Checking[ 22 / 141 ]: 广东卫视高清
Checking[ 23 / 141 ]: 深圳卫视高清
Checking[ 24 / 141 ]: 天津卫视高清
Checking[ 25 / 141 ]: 安徽卫视高清
Checking[ 26 / 141 ]: 山东卫视高清
Checking[ 27 / 141 ]: 湖北卫视高清
Checking[ 28 / 141 ]: 辽宁卫视高清
Checking[ 29 / 141 ]: 重庆卫视高清
Checking[ 30 / 141 ]: 江西卫视高清
Checking[ 31 / 141 ]: 河北卫视高清
Checking[ 32 / 141 ]: 黑龙江卫视高清
Checking[ 33 / 141 ]: 四川卫视
Checking[ 34 / 141 ]: 广西卫视
Checking[ 35 / 141 ]: 河南卫视
Checking[ 36 / 141 ]: 山西卫视
Checking[ 37 / 141 ]: 东南卫视
Checking[ 38 / 141 ]: 厦门卫视
Checking[ 39 / 141 ]: 云南卫视
Checking[ 40 / 141 ]: 宁夏卫视
Checking[ 41 / 141 ]: **卫视
Checking[ 42 / 141 ]: 旅游卫视
Checking[ 43 / 141 ]: 内蒙古卫视
Checking[ 44 / 141 ]: 凤凰中文台超清
Checking[ 45 / 141 ]: 凤凰资讯台超清
Checking[ 46 / 141 ]: 凤凰香港台超清
Checking[ 47 / 141 ]: Newtv动作电影
Checking[ 48 / 141 ]: Newtv惊悚悬疑
Checking[ 49 / 141 ]: Newtv精品电影
Checking[ 50 / 141 ]: Newtv明星大片
Checking[ 51 / 141 ]: Newtv家庭剧场
Checking[ 52 / 141 ]: Newtv精品大剧
Checking[ 53 / 141 ]: Newtv金牌综艺
Checking[ 54 / 141 ]: Newtv精品记录
Checking[ 55 / 141 ]: Newtv精品体育
Checking[ 56 / 141 ]: Newtv北京纪实
Checking[ 57 / 141 ]: Newtv上海纪实
Checking[ 58 / 141 ]: Newtv纪实天下(电)
Checking[ 59 / 141 ]: Newtv全纪实
Checking[ 60 / 141 ]: Newtv欢笑剧场
Checking[ 61 / 141 ]: Newtv都市剧场
Checking[ 62 / 141 ]: 科幻电影
Checking[ 63 / 141 ]: 速度与激情
Checking[ 64 / 141 ]: 赌博电影
Checking[ 65 / 141 ]: 赌神全集新木乃伊
Checking[ 66 / 141 ]: 王晶导演
Checking[ 67 / 141 ]: 徐克导演
Checking[ 68 / 141 ]: 黄渤
Checking[ 69 / 141 ]: 徐峥
Checking[ 70 / 141 ]: 斯坦森
Checking[ 71 / 141 ]: 黄百鸣
Checking[ 72 / 141 ]: 陈小春
Checking[ 73 / 141 ]: 黄日华
Checking[ 74 / 141 ]: 甄子丹
Checking[ 75 / 141 ]: 李连杰
Checking[ 76 / 141 ]: 刘德华
Checking[ 77 / 141 ]: 成龙
Checking[ 78 / 141 ]: 周星驰
Checking[ 79 / 141 ]: 林正英
Checking[ 80 / 141 ]: 徐老师LOL故事
Checking[ 81 / 141 ]: CCTV-1综合
Checking[ 82 / 141 ]: CCTV-2财经
Checking[ 83 / 141 ]: CCTV-3综艺
Checking[ 84 / 141 ]: CCTV-4中文国际
Checking[ 85 / 141 ]: CCTV-5体育
Checking[ 86 / 141 ]: CCTV-5++体育赛事
Checking[ 87 / 141 ]: CCTV-6电影
Checking[ 88 / 141 ]: CCTV-7军事农业
Checking[ 89 / 141 ]: CCTV-8电视剧
Checking[ 90 / 141 ]: CCTV-9记录
Checking[ 91 / 141 ]: CCTV-10科教
Checking[ 92 / 141 ]: CCTV-11戏曲
Checking[ 93 / 141 ]: CCTV-12社会与法
Checking[ 94 / 141 ]: CCTV-13新闻
Checking[ 95 / 141 ]: CCTV-14少儿
Checking[ 96 / 141 ]: CCTV-15音乐
Checking[ 97 / 141 ]: 湖南卫视高清
Checking[ 98 / 141 ]: 江苏卫视高清
Checking[ 99 / 141 ]: 浙江卫视高清
Checking[ 100 / 141 ]: 东方卫视高清
Checking[ 101 / 141 ]: 北京卫视高清
Checking[ 102 / 141 ]: 广东卫视高清
Checking[ 103 / 141 ]: 深圳卫视高清
Checking[ 104 / 141 ]: 天津卫视高清
Checking[ 105 / 141 ]: 安徽卫视高清
Checking[ 106 / 141 ]: 山东卫视高清
Checking[ 107 / 141 ]: 湖北卫视高清
Checking[ 108 / 141 ]: 辽宁卫视高清
Checking[ 109 / 141 ]: 重庆卫视高清
Checking[ 110 / 141 ]: 江西卫视高清
Checking[ 111 / 141 ]: 河北卫视高清
Checking[ 112 / 141 ]: 黑龙江卫视高清
Checking[ 113 / 141 ]: 四川卫视
Checking[ 114 / 141 ]: 广西卫视
Checking[ 115 / 141 ]: 河南卫视
Checking[ 116 / 141 ]: 山西卫视
Checking[ 117 / 141 ]: 东南卫视
Checking[ 118 / 141 ]: 厦门卫视
Checking[ 119 / 141 ]: 云南卫视
Checking[ 120 / 141 ]: 宁夏卫视
Checking[ 121 / 141 ]: **卫视
Checking[ 122 / 141 ]: 旅游卫视
Checking[ 123 / 141 ]: 内蒙古卫视
Checking[ 124 / 141 ]: 凤凰中文台超清
Checking[ 125 / 141 ]: 凤凰资讯台超清
Checking[ 126 / 141 ]: 凤凰香港台超清
Checking[ 127 / 141 ]: Newtv动作电影
Checking[ 128 / 141 ]: Newtv惊悚悬疑
Checking[ 129 / 141 ]: Newtv精品电影
Checking[ 130 / 141 ]: Newtv明星大片
Checking[ 131 / 141 ]: Newtv家庭剧场
Checking[ 132 / 141 ]: Newtv精品大剧
Checking[ 133 / 141 ]: Newtv金牌综艺
Checking[ 134 / 141 ]: Newtv精品记录
Checking[ 135 / 141 ]: Newtv精品体育
Checking[ 136 / 141 ]: Newtv北京纪实
Checking[ 137 / 141 ]: Newtv上海纪实
Checking[ 138 / 141 ]: Newtv纪实天下(电)
Checking[ 139 / 141 ]: Newtv全纪实
Checking[ 140 / 141 ]: Newtv欢笑剧场
Checking[ 141 / 141 ]: Newtv都市剧场
Traceback (most recent call last):
File "/usr/lib/python3.6/urllib/request.py", line 1318, in do_open
encode_chunked=req.has_header('Transfer-encoding'))
File "/usr/lib/python3.6/http/client.py", line 1254, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.6/http/client.py", line 1300, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.6/http/client.py", line 1249, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.6/http/client.py", line 1036, in _send_output
self.send(msg)
File "/usr/lib/python3.6/http/client.py", line 974, in send
self.connect()
File "/usr/lib/python3.6/http/client.py", line 1407, in connect
super().connect()
File "/usr/lib/python3.6/http/client.py", line 946, in connect
(self.host,self.port), self.timeout, self.source_address)
File "/usr/lib/python3.6/socket.py", line 724, in create_connection
raise err
File "/usr/lib/python3.6/socket.py", line 713, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "main.py", line 123, in
obj.run()
File "main.py", line 32, in run
urlList = listB.getSource()
File "/home/acer/iptv-m3u-maker/plugins/listb.py", line 21, in getSource
res = self.T.getPage(url, req)
File "/home/acer/iptv-m3u-maker/tools.py", line 43, in getPage
response = urllib.request.urlopen(request, context = ctx)
File "/usr/lib/python3.6/urllib/request.py", line 223, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.6/urllib/request.py", line 526, in open
response = self._open(req, data)
File "/usr/lib/python3.6/urllib/request.py", line 544, in _open
'_open', req)
File "/usr/lib/python3.6/urllib/request.py", line 504, in _call_chain
result = func(*args)
File "/usr/lib/python3.6/urllib/request.py", line 1361, in https_open
context=self._context, check_hostname=self._check_hostname)
File "/usr/lib/python3.6/urllib/request.py", line 1320, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 111] Connection refused>

执行就是SyntaxError: invalid syntax

你好,我把iptv.py下下来,在cmd中执行python iptv.py好像执行了,但是找不到生成的文件
打开python 命令行模式,执行3行代码,就是语法错误,用idle执行3行代码也是SyntaxError: invalid syntax,我环境变量配了,是哪里有问题了

python main.py 出错

detectData 厦门移动电视 http://cstvpull.live.wscdns.com/live/xiamenyidong.flv
detectData 清华大学电视台 http://v.cic.tsinghua.edu.cn:8080/live/tsinghuatv.flv
Exception in thread Thread-165:
Traceback (most recent call last):
File "/Users/hexin/miniconda3/envs/py39/lib/python3.9/threading.py", line 973, in _bootstrap_inner
Exception in thread Thread-164:
Traceback (most recent call last):
File "/Users/hexin/miniconda3/envs/py39/lib/python3.9/threading.py", line 973, in _bootstrap_inner
self.run()
File "/Users/hexin/miniconda3/envs/py39/lib/python3.9/threading.py", line 910, in run
self.run()
...

python 3.7无法构建

Traceback (most recent call last):
File "/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1317, in do_open
encode_chunked=req.has_header('Transfer-encoding'))
File "/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1244, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1290, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1239, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1026, in _send_output
self.send(msg)
File "/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 966, in send
self.connect()
File "/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1406, in connect
super().connect()
File "/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 938, in connect
(self.host,self.port), self.timeout, self.source_address)
File "/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socket.py", line 707, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
File "/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socket.py", line 748, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 8] nodename nor servname provided, or not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "main.py", line 123, in
obj.run()
File "main.py", line 32, in run
urlList = listB.getSource()
File "/Users/zhanghan/iptv-m3u-maker/plugins/listb.py", line 21, in getSource
res = self.T.getPage(url, req)
File "/Users/zhanghan/iptv-m3u-maker/tools.py", line 43, in getPage
response = urllib.request.urlopen(request, context = ctx)
File "/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 525, in open
response = self._open(req, data)
File "/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 543, in _open
'_open', req)
File "/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 503, in _call_chain
result = func(*args)
File "/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1360, in https_open
context=self._context, check_hostname=self._check_hostname)
File "/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1319, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 8] nodename nor servname provided, or not known>

运行出错

我是个小白,不太懂是不是自己哪一步操作失误了···
用的Windows 10系统,今天刚装了python、git,配置好了环境变量,然后用命令行执行所给的三行命令,第三行命令运行出错,错误内容如下
Traceback (most recent call last):
File "iptv.py", line 110, in
obj.run()
File "iptv.py", line 30, in run
Dotpy.getSource()
File "C:\Users\10718\Desktop\iptv-m3u-maker-master\iptv-m3u-maker\python\plugins\dotpy.py", line 20, in getSource
lines = f.readlines()
UnicodeDecodeError: 'gbk' codec can't decode byte 0xaf in position 8: illegal multibyte sequence

UnicodeDecodeError: 'gbk' codec can't...

我不懂编程,下载的是Python 3.7.4 x64,系统是Windows10 x64 1909版本。
在运行到python main.py命令时,出现 “UnicodeDecodeError: 'gbk' codec can't” 错误,百度后都是Windows下东编码错误,试着修改,修改后能运行了。
就是在文件中搜索到with open,在其后括号内添加“, encoding='UTF-8'”。

非常感谢作者。
运行成功后tv.m3u8文件内**台只有1和9,卫视也不全,希望能多加几个播放源。

第一个错误:
Traceback (most recent call last):
File "main.py", line 106, in
obj.run()
File "main.py", line 25, in run
Dotpy.getSource()
File "G:\iptv-m3u\iptv-m3u-maker\plugins\dotpy.py", line 19, in getSource
lines = f.readlines()
UnicodeDecodeError: 'gbk' codec can't decode byte 0xaf in position 8: illegal multibyte sequence
修改方法:
打开文件 路径\iptv-m3u-maker\plugins\dotpy.py,
定位到第18行,将
with open(sourcePath, 'r') as f:
改为
with open(sourcePath, 'r', encoding='UTF-8') as f:

第二个错误:
Traceback (most recent call last):
File "main.py", line 106, in
obj.run()
File "main.py", line 35, in run
self.outPut()
File "main.py", line 64, in outPut
f.write("#EXTINF:-1, group-title="%s", %s\n" % (className, item[1]))
UnicodeEncodeError: 'gbk' codec can't encode character '\ufeff' in position 32: illegal multibyte sequence
修改方法:
打开文件 路径\iptv-m3u-maker\main.py,
搜索with open,有两处:
第49行,将
with open('tv.m3u8', 'w') as f:
改为
with open('tv.m3u8', 'w', encoding='UTF-8') as f:
第101行,将
with open('tv.json', 'w) as f:
改为
with open('tv.json', 'w', encoding='UTF-8') as f:

listb里面的getRealUrl不太好使

m3u8一时能采集到一时不行,看tool是head只是加入了假IP,直接把链接扔去getRealUrl是会302跳转到首页,小白不知道这是什么原理,有大佬解释吗?

sqlite3.OperationalError: database is locked

Traceback (most recent call last):
File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/home/muziling/my/iptv-m3u-maker/plugins/dotpy.py", line 50, in detectData
self.addData(data)
File "/home/muziling/my/iptv-m3u-maker/plugins/dotpy.py", line 62, in addData
DB.insert(data)
File "/home/muziling/my/iptv-m3u-maker/db.py", line 68, in insert
self.cur.execute(sql)
sqlite3.OperationalError: database is locked

建议增加txt格式频道列表输出

建议增加txt格式频道列表输出方便一些直播apk直接添加txt地址,自动更新节目!
格式为 频道名称,url地址 一个频道一行

超时报错

我又来了……现在分三个阶段整理频道,到第二个的时候会超时。除非挂上VN,但一旦挂上了VN,也就意味着……实际观看的时候会超长延时或者不能播放。

运行没有结果?

加上encoding后运行,没有出错也没有结果。过一会儿就直接停止了。
当然网页显示500
服务器和window运行,结果一致。

写了一个脚本,给m3u文件添加台标信息,希望加入到项目中

微信截图_20200321033813

Screenshot_20200321_034218_ru iptvremote android iptv pro
尊敬的作者您好,我写了一个脚本,可以通过调用POST接口,将您的程序采集过的m3u文件进行二次格式化,可为匹配生成带有台标及EPG的m3u文件 ,但是当我想贴上脚本内容的时候,考虑到我调用的接口,是一个tv爱好者的个人网站提供网页版的post接口,我是抓包获取到的参数,如果您的项目将来用的人特别多,或者一些用户不合理的轮询调用接口,会给原作者的服务器带来压力,因此我考虑联系过原网站站长,沟通以后再考虑是否将此脚本push到您的项目中。

再次感谢您的精品项目。

sqlite3.OperationalError: database is locked

docker 中运行过程中一直报 sqlite3.OperationalError: database is locked,这个影响结果吗?

Checking[ 亳州新闻频道 ]: http://218.22.251.12:8001/tslslive/wT9aUpL/hls/live_sd.m3u8
Exception in thread Thread-1828:
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/threading.py", line 926, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.7/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/src/myapp/plugins/dotpy.py", line 50, in detectData
    self.addData(data)
  File "/usr/src/myapp/plugins/dotpy.py", line 62, in addData
    DB.insert(data)
  File "/usr/src/myapp/db.py", line 68, in insert
    self.cur.execute(sql)
sqlite3.OperationalError: database is locked

本地运行main后报错

已经全部检查完成了,然后报错了。Python3.7
Checking[ 670 / 670 ]: 黑龙江
....
urllib.error.URLError: <urlopen error EOF occurred in violation of protocol (_ssl.c:1056)>

maim.py执行后报错

Traceback (most recent call last):
File "C:\Users\admin\Desktop\iptv-m3u-maker-master\main.py", line 106, in
obj.run()
File "C:\Users\admin\Desktop\iptv-m3u-maker-master\main.py", line 25, in run
Dotpy.getSource()
File "C:\Users\admin\Desktop\iptv-m3u-maker-master\plugins\dotpy.py", line 19, in getSource
lines = f.readlines()
UnicodeDecodeError: 'gbk' codec can't decode byte 0xaf in position 8: illegal multibyte sequence
烦请指导一下是哪里出了问题?

小问题

首先感谢提供这个工具
说说自己碰到的问题

1
我没用docker,所以配置的路径中带有python文字,直接导致文件编辑时出错,这里用的是查找python替换的方式进行的,感觉稍微有些不妥
2
然后是多线程处理有诸多问题
数据库len(result) == 0 的时候会出现NONE的错误,不知道是不是这边的问题
还有就是delay时间计算时候,实际结果不对
数据库插入更新均采用逐条更新逐条提交太影响效率

NONE的错误,我这边是data保存,直接用executemany一起插入(放弃更新)
delay这边用的是线程池的map方法改善的
逐条更新通过executemany一并改善了

3
另外一个源
https://iptv-org.github.io/iptv/index.m3u

Centos 7系统运行docker build命令报错

Sending build context to Docker daemon 754.7kB
Step 1/6 : FROM python:3.7
---> 84d66a048f90
Step 2/6 : ADD ./crontask /etc/cron.d/crontask
---> Using cache
---> ec6d2bf817ad
Step 3/6 : WORKDIR /srv
---> Using cache
---> 225f70053d36
Step 4/6 : RUN pip install -U Flask && apt-get update && apt-get install -y --no-install-recommends cron git wget && apt autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/* && chmod 0644 /etc/cron.d/crontask && touch /home/boot.sh && echo "#!/bin/sh\n" > /home/boot.sh && echo "service cron start" >> /home/boot.sh && echo "\n" >> /home/boot.sh && echo "/usr/local/bin/python /srv/iptv/python/main.py" >> /home/boot.sh && echo "\n" >> /home/boot.sh && echo "/bin/bash" >> /home/boot.sh && git clone https://github.com/EvilCult/iptv-m3u-maker.git && mv iptv-m3u-maker iptv
---> Running in 631c9fc1ac4b
Collecting Flask
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate is not yet valid (_ssl.c:1076)'))': /packages/f2/28/2a03252dfb9ebf377f40fba6a7841b47083260bf8bd8e737b0c6952df83f/Flask-1.1.2-py2.py3-none-any.whl
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate is not yet valid (_ssl.c:1076)'))': /packages/f2/28/2a03252dfb9ebf377f40fba6a7841b47083260bf8bd8e737b0c6952df83f/Flask-1.1.2-py2.py3-none-any.whl
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate is not yet valid (_ssl.c:1076)'))': /packages/f2/28/2a03252dfb9ebf377f40fba6a7841b47083260bf8bd8e737b0c6952df83f/Flask-1.1.2-py2.py3-none-any.whl
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', OSError(0, 'Error'))': /packages/f2/28/2a03252dfb9ebf377f40fba6a7841b47083260bf8bd8e737b0c6952df83f/Flask-1.1.2-py2.py3-none-any.whl
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate is not yet valid (_ssl.c:1076)'))': /packages/f2/28/2a03252dfb9ebf377f40fba6a7841b47083260bf8bd8e737b0c6952df83f/Flask-1.1.2-py2.py3-none-any.whl
ERROR: Could not install packages due to an EnvironmentError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Max retries exceeded with url: /packages/f2/28/2a03252dfb9ebf377f40fba6a7841b47083260bf8bd8e737b0c6952df83f/Flask-1.1.2-py2.py3-none-any.whl (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate is not yet valid (_ssl.c:1076)')))

The command '/bin/sh -c pip install -U Flask && apt-get update && apt-get install -y --no-install-recommends cron git wget && apt autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/* && chmod 0644 /etc/cron.d/crontask && touch /home/boot.sh && echo "#!/bin/sh\n" > /home/boot.sh && echo "service cron start" >> /home/boot.sh && echo "\n" >> /home/boot.sh && echo "/usr/local/bin/python /srv/iptv/python/main.py" >> /home/boot.sh && echo "\n" >> /home/boot.sh && echo "/bin/bash" >> /home/boot.sh && git clone https://github.com/EvilCult/iptv-m3u-maker.git && mv iptv-m3u-maker iptv' returned a non-zero code: 1

[建议] Docker 网络加速

网络不好可选方案

diff --git a/dockerfile b/dockerfile
index ee78ffc..981dd0c 100644
--- a/dockerfile
+++ b/dockerfile
@@ -1,7 +1,8 @@
 FROM python:3.7
 ADD ./crontask /etc/cron.d/crontask
 WORKDIR /srv
-RUN pip install -U Flask \
+RUN pip install -U Flask -i https://pypi.tuna.tsinghua.edu.cn/simple \
+    && sed -i "s@http://\(deb\|security\).debian.org@https://mirrors.aliyun.com@g" /etc/apt/sources.list \
     && apt-get update \
     && apt-get install -y --no-install-recommends cron git wget \
     && apt autoremove -y \
@@ -15,7 +16,7 @@ RUN pip install -U Flask \
     && echo "/usr/local/bin/python /srv/iptv/python/main.py" >> /home/boot.sh \
     && echo "\n" >> /home/boot.sh \
     && echo "/bin/bash" >> /home/boot.sh \
-    && git clone https://github.com/EvilCult/iptv-m3u-maker.git \
+    && git clone --depth=1 https://github.com/EvilCult/iptv-m3u-maker.git \
     && mv iptv-m3u-maker iptv
 WORKDIR /srv/iptv

无法解析数据源

在Win10上用PotPlayer测试可播放后,
将其发送到刷了webpad的安卓固件斐讯N1上,用kodi播放,却无法解析。

非常感谢作者提供的项目!一条建议。

尊敬的作者您好,非常喜欢您的这个项目,希望继续加油。稍后我会将封装好的docker镜像上传到dockerhub,其实您也可以将dockerhub与Github关联一下,让dockerhub根据您github 的推送记录自动构建镜像。
一条建议:
希望可以推出一个功能,就是自动合并自定义的播放源 文件到m3u里面,或者单独提供一个http路径来存放自定义源。
比如我有一个自定义的源文件叫做xxx.m3u,那么如果增加里自定义http路径,访问地址为:
http://xxx:9257/my/xxx.m3u。
或者直接将自定义的源文件合并到整理过的文件中,

添加自定义源和定时执行的入口

首先谢谢Evil大大做得如此棒的项目,方便生成了m3u节目表。我目前使用的是dock版本,有以下几个建议供参考:

  1. 可否增加添加其他ipvt源的入口,让用户可以添加其他源的,比如https://xxxxx.m3u,然后可以整合到https://github.com/EvilCult/iptv-m3u-maker/blob/master/http/tv.m3u中去。
  2. 可否增加定时执行抓取m3u的任务,我没能找到可以定时执行抓取的脚本方式。

谢谢!

Docker运行报错

按照作者的说明,已在群晖中成功部署了,网页能够正常打开,点击“抓取”,点击“状态”看到的日志总是卡在一半结束了,抓取的m3u8也不是实际抓取的结果。

查看日志,找到如下的报错:
FileNotFoundError: [Errno 2] No such file or directory: './plugins/dotpy_source'

于是我就修改如附件的文件,将17行的路径修改为了“/srv/iptv/python/plugins/dotpy_source”
dotpy.py.zip

映射了2个文件夹,/srv/iptv/python和/srv/iptv/http;重启docker后,点击“抓取”再看日志,能看到“正在生成Json文件……抓取完成“,但是点击下载的m3u8仍旧是默认原始的,不是实际分析抓取的版本。查看http里头的tv.m3u,似乎是把所有的无效频道。

麻烦作者大大,看看如何解决找到实际保存的m3u8文件在哪里?谢谢!

hundreds of exceptions : ValueError: unknown url type:

.....
detectData 厦门移动电视 http://cstvpull.live.wscdns.com/live/xiamenyidong.flv
detectData 清华大学电视台 http://v.cic.tsinghua.edu.cn:8080/live/tsinghuatv.flv
Exception in thread Thread-191:
Traceback (most recent call last):
File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/home/ubuntu/iptv-m3u-maker/python/plugins/listb.py", line 67, in detectData
midM3uInfo = self.T.getPage(playUrl, req)
File "/home/ubuntu/iptv-m3u-maker/python/tools.py", line 29, in getPage
request = urllib.request.Request(url)
File "/usr/lib/python3.6/urllib/request.py", line 329, in init
self.full_url = url
File "/usr/lib/python3.6/urllib/request.py", line 355, in full_url
self._parse()
File "/usr/lib/python3.6/urllib/request.py", line 384, in _parse
raise ValueError("unknown url type: %r" % self.full_url)
ValueError: unknown url type: 'I03T05QYzIlXrxnABB1dpJhNd9nQ7NGdcBQMtNBDyFgGfFWXNBQC/ZAdzRgRYBXfQFSS4BUXjRnE9xweRB2XoA0Xxd3TE0RfEdnTqckD3BlU2sHV'

#{hundreds of exceptions here }

Exception in thread Thread-2477:
Traceback (most recent call last):
File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/home/ubuntu/iptv-m3u-maker/python/plugins/listb.py", line 67, in detectData
midM3uInfo = self.T.getPage(playUrl, req)
File "/home/ubuntu/iptv-m3u-maker/python/tools.py", line 29, in getPage
request = urllib.request.Request(url)
File "/usr/lib/python3.6/urllib/request.py", line 329, in init
self.full_url = url
File "/usr/lib/python3.6/urllib/request.py", line 355, in full_url
self._parse()
File "/usr/lib/python3.6/urllib/request.py", line 384, in _parse
raise ValueError("unknown url type: %r" % self.full_url)
ValueError: unknown url type: 'Hw1NnNFCc5HVq13VAhgd5E0adhXS9VzeKI1YrNkCxFVHQdzUCRFX4NVdyZ1RAEXLDwXS/t0W1sHRv4VfBYGX4dEUnkHQQhkeRY3T4ZkV2BQArt3U'

No m3u file generated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.