@@ -25,13 +25,13 @@ class AppStoreScraper:
2525 can be found at https://github.com/facundoolano/app-store-scraper.
2626 """
2727
28- def get_app_ids_for_query (self , term , num = 50 , page = 1 , country = "nl" , lang = "nl" , timeout = None ):
28+ def get_app_ids_for_query (self , term , num = 50 , page = 1 , country = "nl" , lang = "nl" , timeout = None , timeout = None ):
2929 """
3030 Retrieve suggested app IDs for search query
3131
3232 :param str term: Search query
33- :param int num: Amount of items to return per page, default 50
34- :param int page: Amount of pages to return
33+ :param int|None num: Amount of items to return per page, default 50
34+ :param int|None page: Amount of pages to return
3535 :param str country: Two-letter country code of store to search in,
3636 default 'nl'
3737 :param str lang: Language code to search with, default 'nl'
@@ -45,7 +45,10 @@ def get_app_ids_for_query(self, term, num=50, page=1, country="nl", lang="nl", t
4545 url = "https://search.itunes.apple.com/WebObjects/MZStore.woa/wa/search?clientApplication=Software&media=software&term="
4646 url += quote_plus (term )
4747
48- amount = int (num ) * int (page )
48+ if num is None or page is None :
49+ amount = None
50+ else :
51+ amount = int (num ) * int (page )
4952
5053 country = self .get_store_id_for_country (country )
5154 headers = {
@@ -99,6 +102,7 @@ def get_app_ids_for_collection(self, collection="", category="", num=50, country
99102 return result ["resultIds" ]
100103
101104 def get_apps_for_developer (self , developer_id , country = "nl" , lang = "" , timeout = None ):
105+ def get_app_ids_for_developer (self , developer_id , country = "nl" , lang = "" , timeout = None ):
102106 """
103107 Retrieve Apps linked to given developer
104108
0 commit comments