В API отчетов YouTube отсутствует таблица content_owner_ad_revenue_raw_a1

Я использую Retrieve_Report для загрузки аналитики данных. Затем он вернул список доступных типов отчетов:

 name reporting type: content_owner_basic_a3

 name reporting type: content_owner_estimated_revenue_a1

 name reporting type: content_owner_asset_province_a2

 name reporting type: content_owner_asset_playback_location_a2

 name reporting type: content_owner_asset_basic_a2

 name reporting type: content_owner_asset_demographics_a1

 name reporting type: content_owner_demographics_a1

 name reporting type: content_owner_asset_cards_a1

 name reporting type: content_owner_cards_a1

 name reporting type: content_owner_asset_traffic_source_a2

 name reporting type: content_owner_asset_sharing_service_a1

 name reporting type: content_owner_traffic_source_a2

 name reporting type: content_owner_device_os_a2

 name reporting type: content_owner_playlist_combined_a1

 name reporting type: content_owner_playback_location_a2

 name reporting type: content_owner_subtitles_a2

 name reporting type: content_owner_playlist_device_os_a1

 name reporting type: content_owner_end_screens_a1

 name reporting type: content_owner_annotations_a1

 name reporting type: content_owner_ad_rates_a1

 name reporting type: content_owner_playlist_basic_a1

 name reporting type: content_owner_sharing_service_a1

 name reporting type: content_owner_asset_end_screens_a1

 name reporting type: content_owner_asset_device_os_a2

 name reporting type: content_owner_province_a2

 name reporting type: content_owner_playlist_traffic_source_a1

 name reporting type: content_owner_playlist_playback_location_a1

 name reporting type: content_owner_asset_estimated_revenue_a1

 name reporting type: content_owner_combined_a2

 name reporting type: content_owner_asset_annotations_a1

 name reporting type: content_owner_asset_combined_a2

 name reporting type: content_owner_playlist_province_a1

Проблема заключается в том, что Retrieve_Report не может получить тип отчета с именами content_owner_ad_revenue_raw_a1 и content_owner_video_metadata_a2 / content_owner_video_metadata_a1. Есть ли способы загрузки данных из этих типов отчетов?

1 ответ

Это системные отчеты.

Вам нужно будет добавить includeSystemManaged=True в качестве аргумента .list(), В контексте связанного примера кода измените строку 152-158 следующим образом:

try:
    # If the user has not specified a job ID or report URL, retrieve a list
    # of available jobs and prompt the user to select one.
    if not args.job_id and not args.report_url:
      if list_reporting_jobs(youtube_reporting,
                             onBehalfOfContentOwner=args.content_owner
                             includeSystemManaged=True):
        args.job_id = get_job_id_from_user()

Если вы звоните list() функционировать напрямую,

youtube_reporting.jobs().list(onBehalfOfContentOwner={your_content_owner_id}, includeSystemManaged=True).execute()
Другие вопросы по тегам