mirror of
https://github.com/zedeus/nitter.git
synced 2024-12-16 21:16:29 +00:00
Parse video thumbnails for RSS
This commit is contained in:
parent
6fb039dd79
commit
5c6a7bde58
1 changed files with 5 additions and 1 deletions
|
@ -202,6 +202,10 @@ proc getTweetMedia*(tweet: Tweet; node: XmlNode) =
|
||||||
if "gif" in player.attr("class"):
|
if "gif" in player.attr("class"):
|
||||||
tweet.gif = some getGif(player.select(".PlayableMedia-player"))
|
tweet.gif = some getGif(player.select(".PlayableMedia-player"))
|
||||||
elif "video" in player.attr("class"):
|
elif "video" in player.attr("class"):
|
||||||
|
let thumb = player.selectAttr(".PlayableMedia-player", "style").split("'")
|
||||||
|
if thumb.len > 1:
|
||||||
|
tweet.video = some Video(thumb: thumb[^2])
|
||||||
|
else:
|
||||||
tweet.video = some Video()
|
tweet.video = some Video()
|
||||||
|
|
||||||
proc getQuoteMedia*(quote: var Quote; node: XmlNode) =
|
proc getQuoteMedia*(quote: var Quote; node: XmlNode) =
|
||||||
|
|
Loading…
Reference in a new issue