Parse video thumbnails for RSS
This commit is contained in:
parent
6fb039dd79
commit
5c6a7bde58
|
@ -202,6 +202,10 @@ proc getTweetMedia*(tweet: Tweet; node: XmlNode) =
|
|||
if "gif" in player.attr("class"):
|
||||
tweet.gif = some getGif(player.select(".PlayableMedia-player"))
|
||||
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()
|
||||
|
||||
proc getQuoteMedia*(quote: var Quote; node: XmlNode) =
|
||||
|
|
Loading…
Reference in New Issue