This repository was archived by the owner on Jul 1, 2024. It is now read-only.
Add standalone downloaders for POSIX and Windows.#52
Open
KartikSoneji wants to merge 3 commits intothorio:feature/hydrax-downloadfrom
Open
Add standalone downloaders for POSIX and Windows.#52KartikSoneji wants to merge 3 commits intothorio:feature/hydrax-downloadfrom
KartikSoneji wants to merge 3 commits intothorio:feature/hydrax-downloadfrom
Conversation
Contributor
Author
|
@thorio |
Contributor
|
curl has it's own |
Contributor
Author
|
@shinji257 Thanks for letting me know, I will make the changes. |
|
Bro, is there tool for Windows can embed hydrax.com link? I need to download some hydrax link. |
Contributor
Author
|
Save this script as <# ::
@setlocal & copy "%~f0" "%TEMP%%~0n.ps1" >NUL && powershell -NoProfile -ExecutionPolicy Bypass -File "%TEMP%%~0n.ps1" %*
@set "ec=%ERRORLEVEL%" & del "%TEMP%%~0n.ps1"
@exit /b %ec%
#>
# downloadHydraXVideo <slug> <output file> [hd|sd]
function downloadHydraXVideo($1, $2, $3){
$progressPreference = "silentlyContinue";
$response = Invoke-WebRequest "https://ping.iamcdn.net/" `
-UseBasicParsing `
-Method POST `
-Body @{slug = "$1"};
$urlBase64 = (ConvertFrom-Json $response.Content).url;
$url = [System.Text.Encoding]::UTF8.GetString(
[System.Convert]::FromBase64String(
$urlBase64.Chars($urlBase64.Length - 1) + $urlBase64.Substring(0, $urlBase64.Length - 1)
)
);
if("$3" -ne "sd"){
$url = "www." + $url;
}
Invoke-WebRequest "https://$url" `
-UseBasicParsing `
-Headers @{Referer = "https://playhydrax.com/?v=$1"} `
-OutFile "$2";
$progressPreference = "Continue";
}
downloadHydraXVideo $args[0] $args[1] $args[2];Usage: |
|
hello i m new to github . i just recently saw your post here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds standalone downloaders for:
curl(obviously) (GNUsedandbase64needed for the HydraX script).Generates download scripts for direct links and HydraX links.
Also can generate a generic version of referrer links, but it is not currently in use.
Closes #35
Notes
Unfortunately, I could not find a way to do this for the bat script.
parallel.