サムネイルの取得方法まちがってゐたので修正
このコミットが含まれているのは:
@@ -1,4 +1,5 @@
|
||||
from datetime import datetime, timedelta
|
||||
import io
|
||||
import json
|
||||
import time
|
||||
import sys
|
||||
@@ -93,12 +94,14 @@ def main (
|
||||
watched_videos += [datum['contentId']]
|
||||
|
||||
uri = f"https://www.nicovideo.jp/watch/{ datum['contentId'] }"
|
||||
(title, description, thumb) = get_embed_info (uri)
|
||||
(title, description, thumbnail) = get_embed_info (uri)
|
||||
|
||||
embed_external = models.AppBskyEmbedExternal.Main (
|
||||
external = models.AppBskyEmbedExternal.External (
|
||||
title = title,
|
||||
description = description,
|
||||
thumb = thumb,
|
||||
thumb = client.com.atproto.repo.upload_blob (
|
||||
io.BytesIO (requests.get (thumbnail).content)),
|
||||
uri = uri))
|
||||
client.post (Talk.main (f"""
|
||||
ニコニコに『{ datum['title'] }』という動画がアップされました。
|
||||
|
||||
新しい課題から参照
ユーザをブロックする