Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download Support for Region Restricted apps #157

Open
khaleel-git opened this issue Feb 23, 2022 · 6 comments
Open

Download Support for Region Restricted apps #157

khaleel-git opened this issue Feb 23, 2022 · 6 comments

Comments

@khaleel-git
Copy link

khaleel-git commented Feb 23, 2022

I wonder if there's a way with this repository (@NoMore201) to download region restricted apps? If i know the region where the specific apk is supported, i can download it with that specific location configurations but the problem is, how do we know the specific app (for example: https://play.google.com/store/apps/details?id=com.sonyliv) is supported in which specific country? or is blocked on which countries?

Please let me know if its possible ...

@khaleel-git khaleel-git changed the title Region Restriced app Download Support for Region Restricted apps Feb 23, 2022
@khaleel-git
Copy link
Author

khaleel-git commented Feb 25, 2022

RequestError: 'Error retrieving information from server. DF-DFERH-01' with @googleplay-api
My Code:
api = GooglePlayAPI("en_US", timezone = "America/Los_Angeles", device_codename = "manta") #bacon, fs454, manta
api.login(email = mail, password = passwd)

app_id = "com.sonyliv"
docId = app_id
download = api.download(docId, expansion_files=True)
with open(download['docId'] + '.apk', 'wb') as first:
for chunk in download.get('file').get('data'):
first.write(chunk)

@khaleel-git
Copy link
Author

details function working fine, couldn't download apk.

@khaleel-git
Copy link
Author

Yes, I am currently researching about this. Can u seggest me a solution with proxy? I mean how can i download restriced apk by applying proxy?

@khaleel-git
Copy link
Author

Sorry, I am not good with proxy. I think free proxy are bad quality, so you probably need to find paid proxy. Good luck, or maybe you can find another solution.

I think it also require a separate google account for each proxy country.

@Exadra37
Copy link

Exadra37 commented Jun 23, 2023

To download a restricted APK you may ned to first use a compatible device for that country and that is supported by that APK. Go to device.properties and which device uses a country not restricted by the APK and that uses an Android version supported by the APK. If a profile doesn't exist then you need to create a new one.

The bash script I use to update the device.properties file:

#!/bin/bash

# REPO_SRC="https://github.com/yeriomin/play-store-api"
REPO_SRC="https://gitlab.com/AuroraOSS/gplayapi.git"
REPO_LOCAL="/tmp/psapi"
RES_DIR="${REPO_LOCAL}/src/main/resources"

DEVS_FILE="./gpapi/device.properties"

command -v git >/dev/null 2>&1 || { echo "git not installed"; exit 1; }

if [ ! -d "./gpapi" ]; then
        echo "No gpapi dir found! Make sure you're in googleplay-api root dir"
        exit 1
fi

mkdir -p $REPO_LOCAL

echo "==> Cloning play-store-api repo into $REPO_LOCAL"
git clone $REPO_SRC $REPO_LOCAL

# clean device.properties file
echo "" > $DEVS_FILE

for dev in `ls $RES_DIR`; do
        FILE="$RES_DIR/$dev"
        NAME=`echo $dev | sed -e "s/\(.*\).properties/\1/"`
        echo "==> appending device data for $NAME"
        echo -e "\n[$NAME]" >> $DEVS_FILE
        cat $FILE >> $DEVS_FILE
        echo "" >> $DEVS_FILE
done

# cleanup
echo "==> Cleanup"
rm -rf $REPO_LOCAL

I can download some restricted APKs with the correct device properties and OS without using a proxy its necessary to use one.

@ghost
Copy link

ghost commented Jun 23, 2023

above comment is not true. you need to change the country in your Google account settings:

https://github.com/4cq2/googleplay/blob/main/blog/2023-02/geo-blocking.md

unless I see proof otherwise, I am not accepting this claim. provide an example app, and proof of your current region, otherwise the claim is suspect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@Exadra37 @khaleel-git and others