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

avgle程序员恨勤奋 #56

Open
k99999999998 opened this issue Jan 22, 2021 · 7 comments
Open

avgle程序员恨勤奋 #56

k99999999998 opened this issue Jan 22, 2021 · 7 comments

Comments

@k99999999998
Copy link

这个扩展已经失效了,貌似获取不到真实地址了
捕获

@ivideom
Copy link

ivideom commented Jan 22, 2021

You can try the workaround I mentioned in #54

@k99999999998
Copy link
Author

How to use this code can you elaborate

--- a/src/inject/main-player-page-hls.js
+++ b/src/inject/main-player-page-hls.js
@@ -33,9 +33,8 @@ function main(utils, parameters = {}) {
const arr = [];
try {
const segments = player.tech_.hls.playlists.media_.segments;

  •                           segments.forEach(x => arr.push({ uri: x.resolvedUri }));
    
  •                           arr.forEach(videojs.Hls.xhr.beforeRequest);
    
  •                           arr.forEach(x => typeof x.decryptURI === 'function' && x.decryptURI());
    
  •                           segments.forEach(x => arr.push({ uri: x.resolvedUri, method: "HEAD", timeout: 50 }));
    
  •                           arr.forEach(x => x.uri = videojs.Hls.xhr(x, function(){}).uri);
                      } catch (error) {
                              return logError(error);
                      }
    

@sino1641
Copy link

sino1641 commented Feb 5, 2021

You can try the workaround I mentioned in #54

your new code doesn't work.
So could you plz describe a specific way of it?

@IgorOne
Copy link

IgorOne commented Feb 11, 2021

I've looked into the issue and managed to get @ivideom's code to work, but it seems that there is also a problem with the script now. How it works currently is that it 'assumes' that all the segment urls are the same except for the file name. And this is true except for the first two segments:
Screenshot
I'm not sure what happens next, but as the script is regex-based it creates wrong urls for me, and for some it fails with a syntax error, I guess. The easiest solution I see is to directly iterate over the urls which get written to the script but I'm not that proficient in bash to fix this right now.

The good news is that the 'Download list' option still works with just the change in #54 (comment) ! So you can feed this url list into something like aria2 and then manually combine the ts files with ffmpeg. I also forked the repo with ivideom's change and rebuilt extension, so you can use that if you don't want to build it yourself.

@f4db0
Copy link

f4db0 commented Mar 3, 2021

@vide0 召唤大佬

@caokhai1331999
Copy link

May be I did wrong can u elaborate on how to feed url list to sth like aria2, After downloading url list I just simply type git commit aria2c.exe then it shows error"== no such file or directory" .(I tried all the workaround u mentioned above), please show me how to fix it. Thank u!!

@caokhai1331999
Copy link

can i add more pattern into config.js , Will it work ?

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

6 participants