1
0
mirror of https://github.com/zedeus/nitter.git synced 2025-12-08 04:55:37 -05:00

Fix edgecase with nonexistent tweet not withheld

This commit is contained in:
Zed
2019-10-08 15:17:37 +02:00
parent 211b086f4d
commit 369dc994b8

View File

@@ -88,6 +88,9 @@ proc parseQuote*(quote: XmlNode): Quote =
result.getQuoteMedia(quote) result.getQuoteMedia(quote)
proc parseTweet*(node: XmlNode): Tweet = proc parseTweet*(node: XmlNode): Tweet =
if node == nil:
return Tweet()
if "withheld" in node.attr("class"): if "withheld" in node.attr("class"):
return Tweet(tombstone: getTombstone(node.selectText(".Tombstone-label"))) return Tweet(tombstone: getTombstone(node.selectText(".Tombstone-label")))