Decrypt and download HLS playlist(m3u8) of avgle.com video in browser.
Tested on Firefox + uBlock Origin.
avgleHPD ← bookmarklet to run avgle-hls-playlist-downloader.js
- the source code is on GitHub. https://github.com/avotoko/avgle-HLS-playlist-downloader
- tested on Firefox + uBlock Origin.
- uBlock Origin default filter is blocking the third party scripts on avgle.com.
Add the following filter to [My Filters] to allow access to my script.
@@||avotoko.github.io/avgle-HLS-playlist-downloader/avgle-hls-playlist-downloader.js$script,domain=avgle.com - [May 7, 2021] AdGuard Japanese filter prevents the CAPTCHA dialog from appearing on avgle.com, resulting in the video not playing.
Add the following filter to [My Filters] to show CAPTCHA dialog.
avgle.com#@#body > div[style*="z-index"]:not([id]):not([class]) - A Windows batch file to download video using the playlist file is available at the end of this page.
Changes
[v.0.1.8 May 7, 2021]- Corresponding to changes in page script behavior.
[v.0.1.7 Jan. 25, 2021]
- For security reasons, it is no longer possible to modify the content or change the mime type using avglehpdPreDownload. You can still change the file name.
[v.0.1.6 Jan. 25, 2021]
- Added an interface function avglehpdPreDownload to change the file name, content, and mime type to be downloaded.
[v.0.1.4 Jan. 22, 2021]
- Corresponded to avgle.com specification changes.
[v.0.1.2 Jul. 16, 2020]
- Changed the method of getting playlist to support non-encrypted response.
[v.0.1.1 May. 27, 2020]
- Fixed a bug that video cannot be played on browser.
[v.0.1.0 Apr. 6, 2020]
- Initial release
Usage (tested on Firefox + uBlock Origin)
- Open the video page in browser. In March 2022 uBO hides the close button.
- Run avgleHPD.
- [Download HLS Playlist] button will appear when the playlist is successfully retrieved and decrypted.
- Click the button and download avgle.m3u8.
- You can play the video using Streamlink.
streamlink --http-header Referer=https://avgle.com/ file://location/avgle.m3u8 best
Or you can download the video.
streamlink --http-header Referer=https://avgle.com/ file://location/avgle.m3u8 best -o video.ts- The url described in the playlist(m3u8 file) retrieved by AvgleHPD becomes inaccessible after a while.
Try to run Streamlink as soon as possible after retrieving the playlist. - You must specify the url instead of the local path of m3u8 file.
How to convert local path to url: https://en.wikipedia.org/wiki/File_URI_scheme
[Example for Windows]
downloaded file path: c:\temp\avgle.m3u8
url: file:///c:/temp/avgle.m3u8
command line:
streamlink --http-header referer=https://avgle.com/ file:///c:/temp/avgle.m3u8 best
- The url described in the playlist(m3u8 file) retrieved by AvgleHPD becomes inaccessible after a while.
- outputs errors and other information to the console of the browser's developer tools.
Extra
avgleHPD-T ← Bookmarklet to download a playlist(m3u8) file by video title name.
avgleHPD-dl.bat ← Batch file for Windows to download the video itself from avgle.com using playlist(m3u8) file. Requires powershell, streamlink and ffmpeg(optional). Tested on Windows 10.
Changes
[v.0.1.3 Feb. 5, 2021]
- Fixed a bug where ts file name could not be changed from temporary to original when ffmpeg was not available.
- Temporary file name is now created with powershell's Get-Data instead of from the %date% and %time% environment variables, which are formatted differently for each country.
- Improved the output information for troubleshooting.
[v.0.1.2 Feb. 5, 2021]
- Fixed a bug that failed to create a temporary playlist file in some environments.
[v.0.1.1 Jan. 29, 2021]
- Fixed some bugs.
[v.0.1.0 Jan. 29, 2021]
- Initial release
[v.0.1.3 Feb. 5, 2021]
- Fixed a bug where ts file name could not be changed from temporary to original when ffmpeg was not available.
- Temporary file name is now created with powershell's Get-Data instead of from the %date% and %time% environment variables, which are formatted differently for each country.
- Improved the output information for troubleshooting.
[v.0.1.2 Feb. 5, 2021]
- Fixed a bug that failed to create a temporary playlist file in some environments.
[v.0.1.1 Jan. 29, 2021]
- Fixed some bugs.
[v.0.1.0 Jan. 29, 2021]
- Initial release
Usage
- Download avgleHPD-dl.bat and save it in an appropriate folder.
- The batch file you downloaded has been blocked by Windows system. Please go to the file's properties and unblock [Security: This file came from another computer and might be blocked to help protect this computer.] in [General] tab.
- Drag and drop the downloaded playlist (m3u8) file onto the avgleHPD-dl.bat icon.
- Batch file downloads the video using streamlink to the same folder as the playlist (m3u8) file.
- Batch file converts ts file to mp4 if ffmpeg is available.
[NOTE]
Path name (title) containing the character '&' cannot be processed correctly.