Skip to content

Commit

Permalink
Update script.sh with test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
NicholasFlamy authored Aug 4, 2024
1 parent 6be573b commit e168f07
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,16 @@ for version in "${versions[@]}"; do

url3=$(curl -sL -A "$UserAgent" "https://www.apkmirror.com$url2" | pup -p --charset UTF-8 'a[data-google-vignette="false"][rel="nofollow"] attr{href}')

[ "$url3" == "" ] && continue
[ "$url3" == "a" ] && continue
echo "3/3 url3: $url3"

echo "https://www.apkmirror.com$url3" >&2
echo "Downloading APK from: https://www.apkmirror.com$url3"
echo "https://www.apkmirror.com$url2" >&2
echo "Downloading APK from: https://www.apkmirror.com$url2"

# Make Directory for APK file
mkdir snapchatapk
# Download the APK file and save it as snap.apk
wget -U "$UserAgent" -O snapchatapk/$version.apk "https://www.apkmirror.com$url3"
wget -U "$UserAgent" -O snapchatapk/$version.apk "https://www.apkmirror.com$url2"
if [ $? -eq 0 ]; then
echo "APK downloaded successfully as $version.apk"
exit 0
Expand Down

0 comments on commit e168f07

Please sign in to comment.