Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

m3u8文件中换行\r问题 #58

Open
qice opened this issue Jun 26, 2023 · 0 comments
Open

m3u8文件中换行\r问题 #58

qice opened this issue Jun 26, 2023 · 0 comments

Comments

@qice
Copy link

qice commented Jun 26, 2023

部分m3u8文件中每行是以\r\n结尾,使得getTsList 获取ts的url后面多了 \r 控制符,导致请求失败;
解决办法:

                                ts = TsInfo{
                                        Name: fmt.Sprintf(TS_NAME_TEMPLATE, index),
-                                       Url:  line,
+                                       Url:  strings.Replace(line, "\r", "", -1), // 直接替换掉
                                }

测试的m3u8: https://43.154.3.196/vtt/gc02/changfengdu/19.m3u8

最后,工具不错👍,多协程下载就是快,比ffmpeg要快多了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant