-
Notifications
You must be signed in to change notification settings - Fork 65
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 new m3u8 URL regex - 新 m3u8 url 格式 #54
Comments
After modified still getting error. download-FC2-PPV-1648397.sh: line 886: ((: i<=!WU1HRUQLSxgLQgNQBAVTWgVUBRlXAAhIEF5eRg9SRF1VXFwbVF4JGAlXSF9LXwk1USdcU3IxMTERWRxQLX9qTkZeH0YKHQFZBg8AVAMEU1AEWwUCGAgPCwhFDAVMU1NAUAQCAwYAVQRRCwFXHUYWAkMHCG51AgI8TEt6GBFSVFFDXEEIUV4WVAceHwNEUg4GGQFaWhsWAwAVUFYKVgEDBAgPBwEYXAFTC1MMCl5GI0xEEVEDG1VRUU4IHgVQAAsBAQ4GDBlcFANNQVQFHwZbVBoUBBpVVUgSEg== : syntax error: operand expected (error token is "== ") |
Seems the dectyptURI function call will check whether its called by functions in "avgle.com/templates/frontend/videojs-contrib-hls.js" (which's used to generate md5 hash for decrypting the video segment uri). |
You may try a workaround like this: --- 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);
} It works, though hundreds of requests will be sent (querying for response headers only, no data)... |
tried the workaround but still getting the same error. function main(utils, parameters = {}) {
|
Note that you will need to rebuild the chrome extension after src code updated. # Install Node.js and yarn
# Visit: https://nodejs.org/en/
# And https://yarnpkg.com/getting-started/install
# Install dependencies
yarn install
# Launch builder script
yarn run build |
就2点:
var backupBeforeRequest = videojs.Hls.xhr.beforeRequest;
var done = false;
let v = videojs('video-player');
v.on('loadedmetadata', function () {
console.log('test:', 'loadedmetadata')
videojs.Hls.xhr.beforeRequest = function () {
backupBeforeRequest.apply(videojs.Hls.xhr, arguments);
if (!done) {
console.log('start decrypt video uri')
done = true;
try {
v = videojs('video-player');
arr = v.tech_.hls.playlists.media_.segments.map(x => {
return {
uri: x.resolvedUri,
"timeout": 0,
"withCredentials": false,
"responseType": "arraybuffer",
"headers": {}
}
});
for(let item of arr)
{
videojs.Hls.xhr.beforeRequest(item)
item.decryptURI();
}
console.log(arr[0]);
}
catch (e) {
console.error('some error', e);
}
}
}
}) |
so how to use it, thx |
this actually works, thanks a lot !!! |
… (comment)) + extension rebuild (Only 'Download list' works)
I'm encountering the below warning and causing the script to retry wget again without Referer header, it can be fixed by updating the download.sh and downloader-hls.sh in your extension/dist folder (re-import after updating the sh). Replace With |
Avgle seems to have new unencrypted m3u8 format, in the form of
avgle 新的一个 m3u8 格式, 可以加到
src\config.js
里去For now fixed locally by adding to unencrypted regexes at
src\config.js
和
The text was updated successfully, but these errors were encountered: