[bluesky] extract 'hashtags', 'mentions', and 'uris' metadata (#4438)

This commit is contained in:
Mike Fährmann
2024-02-10 00:01:55 +01:00
parent 55bbd49a0e
commit c7d17f1111
2 changed files with 60 additions and 0 deletions

View File

@@ -39,6 +39,51 @@ __tests__ = (
"repostCount": int,
"uri" : "at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.post/3kh5rarr3gn2n",
"width" : 1200,
"hashtags" : [],
"mentions" : [],
"uris" : ["https://blueskyweb.xyz/blog/12-21-2023-butterfly"],
},
{
"#url" : "https://bsky.app/profile/mikf.bsky.social/post/3kkzc3xaf5m2w",
"#category": ("", "bluesky", "post"),
"#class" : bluesky.BlueskyPostExtractor,
"#urls" : "https://bsky.social/xrpc/com.atproto.sync.getBlob?did=did:plc:cslxjqkeexku6elp5xowxkq7&cid=bafkreib7ydpe3xxo4cq7nn32w7eqhcanfaanz6caepd2z4kzplxtx2ctgi",
"#sha1_content": "9cf5748f6d00aae83fbb3cc2c6eb3caa832b90f4",
"author": {
"did" : "did:plc:cslxjqkeexku6elp5xowxkq7",
"displayName": "mikf",
"handle" : "mikf.bsky.social",
"labels" : [],
},
"cid" : "bafyreihtck7clocti2qshaiounadof74pxqhz7gnvbstxujqzhlodigqru",
"count" : 1,
"createdAt" : "2024-02-09T21:57:31.917Z",
"date" : "dt:2024-02-09 21:57:31",
"description": "reading lewd books",
"extension" : "jpeg",
"filename" : "bafkreib7ydpe3xxo4cq7nn32w7eqhcanfaanz6caepd2z4kzplxtx2ctgi",
"hashtags" : [
"patchouli",
"patchy",
],
"mentions" : [
"did:plc:cslxjqkeexku6elp5xowxkq7",
],
"uris" : [
"https://seiga.nicovideo.jp/seiga/im5977527",
],
"width" : 1024,
"height" : 768,
"langs" : ["en"],
"likeCount" : int,
"num" : 1,
"post_id" : "3kkzc3xaf5m2w",
"replyCount" : int,
"repostCount": int,
"text" : "testing \"facets\"\n\nsource: seiga.nicovideo.jp/seiga/im5977...\n#patchouli #patchy\n@mikf.bsky.social",
"uri" : "at://did:plc:cslxjqkeexku6elp5xowxkq7/app.bsky.feed.post/3kkzc3xaf5m2w",
},
)