Browse Source

Parse video profile

Zed 6 năm trước cách đây
mục cha
commit
179b3bc496
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      src/parser.nim

+ 2 - 0
src/parser.nim

@@ -255,6 +255,8 @@ proc parseTweet(js: JsonNode): Tweet =
         result.photos.add m{"media_url_https"}.getImageStr
       of "video":
         result.video = some(parseVideo(m))
+        with user, m{"additional_media_info", "source_user"}:
+          result.attribution = some(parseProfile(user))
       of "animated_gif":
         result.gif = some(parseGif(m))
       else: discard