import epicstore_api
client = epicstore_api.EpicGamesStoreAPI()
search_results = client.fetch_store_games(keywords="Dead Island 2 Gold Edition", allow_countries="UK")
print(search_results)
如果我使用ALLOW_COUNTRIES="UK"或其他命令,我只会得到美国的数据,这会给我默认美国的相同结果.
import epicstore_api
client = epicstore_api.EpicGamesStoreAPI()
search_results = client.fetch_store_games(keywords="Dead Island 2 Gold Edition", allow_countries="UK")
print(search_results)
如果我使用ALLOW_COUNTRIES="UK"或其他命令,我只会得到美国的数据,这会给我默认美国的相同结果.
client = epicstore_api.api.EpicGamesStoreAPI(locale='en-US', country='US', session=None)
国家的默认值是‘美国’,所以你永远不会看到英国的结果,当我将国家设置为英国时,我得到了500个http响应:服务器不知道如何处理这个请求,因此英国是未知的国家代码.
然而,"GB"将会做得很好. 因此您可以将您客户端设置为Follow和Go
client = epicstore_api.EpicGamesStoreAPI( locale='en-GB',country='GB')
和神奇地允许_国家接受英国作为值
client.fetch_store_games(keywords="Dead Island 2 Gold Edition",allow_countries="UK")