计算 twurl 检索到的带有特定主题标签的推文

Count twurl's retrieved tweets with a specific hashtags

previous question 开始,设法使用以下命令从特定主题标签请求推文

twurl "/1.1/search/tweets.json?q=#HASHTAG"

假设我们想知道使用主题标签 "jesus" 的推文,那么我们会做

twurl "/1.1/search/tweets.json?q=#jesus" 

这给出了以下 JSON

Check here the get the full JSON(无法将其放在这里,因为问题的正文限制为 30000 个字符)。

如何计算检索到的推文数量(使用标准搜索 API)?

可以通过转到 Notepad++ > 将 JSON 粘贴到那里 > CTRL + F > {"created_at": > Count

来计算推文的数量

有 24 场比赛,这意味着 24 条推文。

有几种方法可以做到这一点,例如,您可以使用 jq 来过滤和计算结果的数量。 https://gist.github.com/andypiper/32bdb4c7f0b8d65385fc7c8fa3988083

twurl "/1.1/search/tweets.json?q=%23london&count=100" | jq '[.statuses[]] | length'