2

我想在 App Annie 中使用 Python API 查询,运行流畅但响应输出为 503,即服务不可用,不知道我的代码中哪一个错误,请指教?

import json
import requests

url = """https://www.appannie.com/intelligence/apps/comparator/v2/?queries=(__common__:(breakdowns:(product_id:(),unified_product_id:!n),filters:(app_group_id:(equal:FRUSMFLWA4B4GXR45RPK4BJQ2S4HNIUV4SD3ZG6WKVMNCCWKYBGA====),country_code:(in:!(ID)),date:(between:!(%272019-10-01%27,%272020-03-09%27)),device_code:(equal:all-phone))),common:(breakdowns:(product_id:(),unified_product_id:!n),filters:(app_group_id:(equal:FRUSMFLWA4B4GXR45RPK4BJQ2S4HNIUV4SD3ZG6WKVMNCCWKYBGA====),country_code:(in:!(VN)),date:(between:!(%272018-01-01%27,%272019-12-18%27)),device_code:(equal:all))),comparator_chart:(breakdowns:(date:()),filters:(app_group_id:!n,product_id:(in:!(20600003362928,20600003052314,20600000007927,898244857,890405921,20600000008234,440676901,367003839,20600000035700,434613896)),unified_product_id:!n),order_by:!((name:date,order:asc))),comparator_table:(order_by:!((name:est_download__sum,order:desc)),pagination:(limit:100,offset:0)),granularity:(filters:(granularity:(equal:monthly))))&chart_comparator_chartunified_product_id=(percent:!f,stack:!f,type:line)&chart_comparator_chartproduct_id=(percent:!f,stack:!f,type:line)&chart_comparator_chart$unified_product_id=(percent:!f,stack:!f,type:line)&chart_comparator_chart$product_id=(percent:!f,stack:!f,type:line)"""
api_key = "7c512c33ea570af2daefa6318f63f2d2b411ce75"
key = f'bearer {api_key}'

response = requests.get(url, headers={'Authorization':key})
# data = json.loads(response.json())

在此处输入图像描述

4

0 回答 0