Ne-Lexa / google-play-scraper

PHP scraper to get data from Google Play
MIT License
78 stars 38 forks source link

🩹 Fix descriptions sometimes being inaccurate on RTL languages #48

Open Log1x opened 1 year ago

Log1x commented 1 year ago

This fixes inaccurate descriptions being thrown in some cases when scraping apps in RTL languages.

This was notably an issue with Tumblr. I am not deep enough into my scrape yet to notice any other discrepancies, so I'm hoping this is it.

// Requires the fix, otherwise it will return the English description.
$apps->getAppInfoForLocales('com.tumblr', ['ar']);

// Description is in the proper place.
$apps->getAppInfoForLocales('com.instagram.android', ['ar']);

Not sure what makes Tumblr unique in this scenario, but with a test of 1000 apps in 13 languages, this fix has proved to work as intended.