|
@@ -1867,7 +1867,15 @@ class ChannelsAccountCrawler(CrawlerAccounts):
|
|
|
|
|
|
# fetch account video list for the first page
|
|
|
search_video_response = get_channel_account_videos(account_id)
|
|
|
- video_list = search_video_response["data"]["object"]
|
|
|
+ search_response_data = search_video_response["data"]
|
|
|
+ search_response_data_type = type(search_response_data)
|
|
|
+ if search_response_data_type == dict:
|
|
|
+ video_list = search_response_data["object"]
|
|
|
+ elif search_response_data_type == list:
|
|
|
+ video_list = search_response_data
|
|
|
+ else:
|
|
|
+ raise RuntimeError("search video response type error")
|
|
|
+
|
|
|
title_list = [i['objectDesc']['description'] for i in video_list]
|
|
|
title_list_str = json.dumps(title_list, ensure_ascii=False)
|
|
|
self.process_channels_account(account_name, account_id, title_list_str)
|