Skip to content

Commit

Permalink
temp
Browse files Browse the repository at this point in the history
  • Loading branch information
shekhawat2 committed Mar 6, 2024
1 parent 7605d77 commit 9f820c3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions yt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,11 @@ dl_yt() {
rm -rf $2
echo "Downloading YouTube $1"
url="https://www.apkmirror.com/apk/google-inc/youtube/youtube-${1//./-}-release/"
echo "URL1: $url"
url="$url$(req "$url" - | grep Variant -A50 | grep ">APK<" -A2 | grep android-apk-download | sed "s#.*-release/##g;s#/\#.*##g")"
echo "URL2: $url"
url="https://www.apkmirror.com$(req "$url" - | grep "downloadButton" | sed -n 's;.*href="\(.*key=[^"]*\)">.*;\1;p')"
echo "URL3: $url"
url="https://www.apkmirror.com$(req "$url" - | grep "please click" | sed -n 's#.*href="\(.*key=[^"]*\)">.*#\1#;s#amp;##p')&forcebaseapk=true"
echo "URL: $url"
req "$url" "$2"
Expand All @@ -47,8 +50,11 @@ dl_ytm() {
rm -rf $2
echo "Downloading YouTubeMusic $1"
url="https://www.apkmirror.com/apk/google-inc/youtube/youtube-music-${1//./-}-release/"
echo "URL1: $url"
url="$url$(req "$url" - | grep arm64 -A30 | grep youtube-music | head -1 | sed "s#.*-release/##g;s#/\".*##g")"
echo "URL2: $url"
url="https://www.apkmirror.com$(req "$url" - | grep "downloadButton" | sed -n 's;.*href="\(.*key=[^"]*\)">.*;\1;p')"
echo "URL3: $url"
url="https://www.apkmirror.com$(req "$url" - | grep "please click" | sed -n 's#.*href="\(.*key=[^"]*\)">.*#\1#;s#amp;##p')&forcebaseapk=true"
echo "URL: $url"
req "$url" "$2"
Expand Down

0 comments on commit 9f820c3

Please sign in to comment.