mirror of
https://github.com/zedeus/nitter
synced 2026-09-05 22:59:31 +00:00
Add support for polls
This commit is contained in:
parent
ff01ab61d1
commit
1a0ccbb3f7
7 changed files with 140 additions and 17 deletions
|
|
@ -157,3 +157,8 @@ proc getQuoteMedia*(quote: var Quote; node: XmlNode) =
|
|||
quote.badge = some(badge.innerText())
|
||||
elif gifBadge != nil:
|
||||
quote.badge = some("GIF")
|
||||
|
||||
proc getTweetCards*(tweet: Tweet; node: XmlNode) =
|
||||
if node.attr("data-has-cards") == "false": return
|
||||
if "poll" in node.attr("data-card2-type"):
|
||||
tweet.poll = some(Poll())
|
||||
|
|
|
|||
Loading…
Reference in a new issue