从RSS feed推断标签值

时间:2019-05-07 17:06:59

标签: python rss feedparser

我需要从此RSS标记推断日期值(2019-05-06T08:00:00)

<x-trumba:localstart tzAbbr="EDT" tzCode="20400">2019-05-06T08:00:00</x-trumba:localstart>

https://www.trumba.com/calendars/gazette.rss?date=20190506&xcal=1),但是我只能返回字典({'tzabbr':'EDT','tzcode':'20400'})。这就是我所做的。谢谢!

import feedparser
import dateutil.parser
url = 'https://www.trumba.com/calendars/gazette.rss?date=20190506&xcal=1'
d = feedparser.parse(url)
for entry in d.entries:
    print (entry['x-trumba_localstart'])

0 个答案:

没有答案