Python 当出现';没有Etag支持
我尝试过此代码,但似乎不起作用:Python 当出现';没有Etag支持,python,rss,feedparser,Python,Rss,Feedparser,我尝试过此代码,但似乎不起作用: import feedparser import time c = feedparser.parse('http://www.tsa-algerie.com/feed/') constID = c['entries'][0].id print c['entries'][0]['title'] while True: time.sleep(300) if constID != c['entries'][0].id: prin
import feedparser
import time
c = feedparser.parse('http://www.tsa-algerie.com/feed/')
constID = c['entries'][0].id
print c['entries'][0]['title']
while True:
time.sleep(300)
if constID != c['entries'][0].id:
print c['entries'][0].title
constID = c['entries'][0].id
RSS源是“哑”的,默认情况下,它们不会传播更新,这意味着,如果您需要知道某个源是否已更新,您必须自己获取它,并比较两个连续的版本
除了RSS之外,还有一些协议可能会有所帮助,包括允许您订阅现有的中心,以便在提要更新时(通过Webhook)收到通知。提供与任何提要一起工作的默认集线器