在使用AppStoreScraper时需要根据其API文档使用正确的参数。其中,app_id参数需要传入正确的应用ID才能获取对应的评论。示例代码如下:
from app_store_scraper import AppStore
from pprint import pprint
app_id = 'your_app_id_here'
appstore = AppStore(country="us", app_name='app_name_here')
result, _ = appstore.reviews(
app_id, # App ID from Apple's iTunesConnect (i.e. '405343352')
review_sort=AppStore.Sort.MOST_RECENT,
# other optional arguments that can be used to filter reviews
)
pprint(result)