Fix getLink typo
This commit is contained in:
parent
7ef10b88f4
commit
97166feec9
2 changed files with 3 additions and 5 deletions
|
@ -96,4 +96,4 @@ proc getTime*(tweet: Tweet): string =
|
|||
tweet.time.format("d/M/yyyy', ' HH:mm:ss")
|
||||
|
||||
proc getLink*(tweet: Tweet | Quote): string =
|
||||
&"{tweet.profile.username}/status/{tweet.id}"
|
||||
&"/{tweet.profile.username}/status/{tweet.id}"
|
||||
|
|
|
@ -127,14 +127,12 @@ proc parseVideo*(node: JsonNode): Video =
|
|||
durationMs: track["durationMs"].to(int),
|
||||
views: track["viewCount"].to(string),
|
||||
url: track["playbackUrl"].to(string),
|
||||
available: track{"mediaAvailability"}["status"].to(string) == "available"
|
||||
)
|
||||
available: track{"mediaAvailability"}["status"].to(string) == "available")
|
||||
of "vmap":
|
||||
result = Video(
|
||||
playbackType: vmap,
|
||||
durationMs: track["durationMs"].to(int),
|
||||
url: track["vmapUrl"].to(string)
|
||||
)
|
||||
url: track["vmapUrl"].to(string))
|
||||
else:
|
||||
echo "Can't parse video of type ", cType
|
||||
|
||||
|
|
Loading…
Reference in a new issue