v.redd.it links (videos) #125
Replies: 2 comments
-
You can use it personally but I don't think I can add it in the repository because Imagus doesn't seem to have an open source license. |
Beta Was this translation helpful? Give feedback.
-
That's fair. Since I understood it a little better I went and just made one myself: {
"r": "v\\.redd\\.it/([\\da-z]+).*",
"s": "https://v.redd.it/$1/DASHPlaylist.mpd",
"q": "const vid_id = node.href.match(/v\\.redd\\.it\\/([\\da-z]+).*/)[1]; return (match = text.match(\/<AdaptationSet.*contentType=\"(\\w+)\"[\\s\\S]*?<\\\/AdaptationSet>\/))?.[1] === \"video\" ? \"https://v.redd.it/\"+vid_id+\"/\"+Array.from(match[0].matchAll(\/<BaseURL>(.+)<\\\/BaseURL>\/g)).pop()?.[1] : undefined"
} This one doesn't seem to work on github itself (at least for me on firefox) cause of an error that says I could probably modify the rule a bit to grab the audio too, if that ever were to become relevant. |
Beta Was this translation helpful? Give feedback.
-
So I took a quick stab at v.redd.it links since I remembered, imagus had them working, so I went and tried to kinda copy it over, and I have it seeming to work, there's a couple details though, one is fairly minor and the other, maybe a bit less so.
The rule is:
It can be tested with this link: https://v.redd.it/ykr4m3jiwp4e1
The minor issue is, in the imagus sieve, instead of running the same regex to get the url again, they still have access to the regex match that was done on the url. The docs indicate that that's not present in the query property, so I manually ran it again on the node.
The second problem, and this might be out of scope for mpiv, but just in case:
The dash playlist has different links to the video, and the audio. Both are in mp4 files, but I'm unsure if there's a simple/fast way to merge them, or just play them both together with mpiv. For now I've just done with imagus did which is grab the video and just play that, but if there's something mpiv could do to facilitate playing both at once, that'd be kinda cool, but again, I wouldn't be surprised if it's out of the scope of mpiv.
Beta Was this translation helpful? Give feedback.
All reactions