Scraping Apple Store Reviews
Problemβ
How to scrap Apple Store Reviews? There are some python libs but they have difficulties to work...
Solutionβ
We can use the lib apple-store-scraper (19 stars on 01/09/2023, last update: 24/04/2023). This is a fork of the lib app-store-scraper which is marked as deprecated on GitHub and is not maintained any more since 2021. I did not find any other working libraries (they all seem to be deprecated).
Limitationsβ
- The dependencies of the lib specifies
requests==2.25.0, which is an old version, and so making dependencies resolution often failing with poetry. You can install it manually withpipinstead. - The
search_idfeature does not work anymore due to a Google Update, you have to pass theapp_idparam to theAppStoreinstance to make it work.
Exampleβ
from apple_store_scraper import AppStore
app = AppStore(
country="fr",
app_name="SNCF Connect",
app_id="343889987", # find it in the url
log_level="error" # hide logs (optional)
)
# fetch reviews
app.review(how_many=400)
# transform to DataFrame
data = pd.DataFrame(
app.reviews,
columns=["date", "review", "rating", "title", "userName"],
)