Skip to content

Commit

Permalink
yt.sh: fix apk downloading
Browse files Browse the repository at this point in the history
  • Loading branch information
shekhawat2 committed Aug 5, 2024
1 parent ed3f4c5 commit e611a0d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions yt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ dl_yt() {
echo "Downloading YouTube $1"
url="https://www.apkmirror.com/apk/google-inc/youtube/youtube-${1//./-}-release/"
url="$url$(req "$url" - | grep Variant -A50 | grep ">APK<" -A2 | grep android-apk-download | sed "s#.*-release/##g;s#/\#.*##g")"
url="https://www.apkmirror.com$(req "$url" - | grep "downloadButton" | grep "forcebaseapk" | sed -n 's;.*href="\(.*key=[^"]*\)">.*;\1;p')"
url="https://www.apkmirror.com$(req "$url" - | grep "downloadButton" | grep "forcebaseapk" | sed -n 's;.*href="\(.*key=[^"]*\)".*;\1;p')"
url="https://www.apkmirror.com$(req "$url" - | grep "please click" | sed 's#.*href="\(.*key=[^"]*\)">.*#\1#;s#amp;##p')"
echo "URL: $url"
req "$url" "$2"
Expand All @@ -48,7 +48,7 @@ dl_ytm() {
echo "Downloading YouTubeMusic $1"
url="https://www.apkmirror.com/apk/google-inc/youtube/youtube-music-${1//./-}-release/"
url="$url$(req "$url" - | grep arm64 -A30 | grep youtube-music | head -1 | sed "s#.*-release/##g;s#/\".*##g")"
url="https://www.apkmirror.com$(req "$url" - | grep "downloadButton" | grep "forcebaseapk" | sed -n 's;.*href="\(.*key=[^"]*\)">.*;\1;p')"
url="https://www.apkmirror.com$(req "$url" - | grep "downloadButton" | grep "forcebaseapk" | sed -n 's;.*href="\(.*key=[^"]*\)".*;\1;p')"
url="https://www.apkmirror.com$(req "$url" - | grep "please click" | sed 's#.*href="\(.*key=[^"]*\)">.*#\1#;s#amp;##p')"
echo "URL: $url"
req "$url" "$2"
Expand Down

0 comments on commit e611a0d

Please sign in to comment.