mirror of
https://github.com/zedeus/nitter
synced 2026-09-05 22:59:31 +00:00
Display sensitive quotes properly
This commit is contained in:
parent
a098d3ea84
commit
94b2187453
4 changed files with 34 additions and 2 deletions
|
|
@ -135,6 +135,11 @@ proc getTweetMedia*(tweet: Tweet; node: XmlNode) =
|
|||
tweet.video = some(Video())
|
||||
|
||||
proc getQuoteMedia*(quote: var Quote; node: XmlNode) =
|
||||
let sensitive = node.querySelector(".QuoteTweet--sensitive")
|
||||
if not sensitive.isNil:
|
||||
quote.sensitive = true
|
||||
return
|
||||
|
||||
let media = node.querySelector(".QuoteMedia")
|
||||
if not media.isNil:
|
||||
quote.thumb = some(media.selectAttr("img", "src"))
|
||||
|
|
|
|||
Loading…
Reference in a new issue