mirror of
https://github.com/zedeus/nitter
synced 2026-09-06 07:09:31 +00:00
Merge branch 'fork-graveyard/master'
This commit is contained in:
commit
2a5541c126
4 changed files with 41 additions and 12 deletions
|
|
@ -87,10 +87,15 @@ proc parseVideo(js: JsonNode): Video =
|
|||
result.description = description.getStr
|
||||
|
||||
for v in js{"video_info", "variants"}:
|
||||
let
|
||||
contentType = parseEnum[VideoType](v{"content_type"}.getStr("summary"))
|
||||
url = v{"url"}.getStr
|
||||
|
||||
result.variants.add VideoVariant(
|
||||
contentType: parseEnum[VideoType](v{"content_type"}.getStr("summary")),
|
||||
contentType: contentType,
|
||||
bitrate: v{"bitrate"}.getInt,
|
||||
url: v{"url"}.getStr
|
||||
url: url,
|
||||
resolution: if contentType == mp4: getMp4Resolution(url) else: 0
|
||||
)
|
||||
|
||||
proc parsePromoVideo(js: JsonNode): Video =
|
||||
|
|
|
|||
Loading…
Reference in a new issue