유튜브 업로드 주기 계산 로직 추가
This commit is contained in:
1 parent
c0fa48ff75
commit
5ff1d68a27
2 files changed
+58
-29
No files matched your search
@@ -113,13 +113,14 @@ def _naver_blog_summary(blog: dict | None) -> dict | None:
|
||||
}
|
||||
|
||||
async def _build_youtube_audit(youtube: dict) -> dict: # 기획상 1개의 input channel, 다중 채널은 기획에 없음.
|
||||
videos = youtube.get("videos", [])
|
||||
videos = youtube.get("videos", [])
|
||||
recents = youtube.get("recents", [])
|
||||
yt_patch: dict = {
|
||||
"weekly_view_growth": {"absolute": 0, "percentage": 0.0},
|
||||
"estimated_monthly_revenue": {"min": 0, "max": 0},
|
||||
"linked_urls": [],
|
||||
"avg_video_length": calc_avg_video_length(videos),
|
||||
"upload_frequency": calc_upload_frequency(videos),
|
||||
"upload_frequency": calc_upload_frequency(recents),
|
||||
}
|
||||
if youtube.get("channelName"): yt_patch["channel_name"] = youtube["channelName"]
|
||||
if youtube.get("handle"): yt_patch["handle"] = youtube["handle"]
|
||||
|
||||
Reference in new issue
Block a user