facundoolano / app-store-scraper

scrape data from the itunes app store
MIT License
1.03k stars 242 forks source link

Crash when an invalid language is provided #181

Open AlexLeonte opened 2 years ago

AlexLeonte commented 2 years ago

While calling appStore.app({ id: '....', lang: 'es', country: 'US' }) and if the lang is an invalid one, it will crash.

todo:

https://itunes.apple.com//lookup?id=479516143&country=US&entity=software&lang=xxxx

will return

{ "errorMessage":"Invalid value(s) for key(s): [language]", "queryParameters":{"output":"json", "callback":"A javascript function to handle your search results", "country":"ISO-2A country code", "limit":"The number of search results to return", "term":"A search string", "lang":"ISO-2A language code"} }

Can this happen when calling the .app method also be returned ?

Thanks

WilderLopez commented 1 year ago

any update for this ?