28 lines
655 B
Python
28 lines
655 B
Python
from pyquery import PyQuery as pq
|
|
from feedgen.feed import FeedGenerator
|
|
|
|
def parseNvidia():
|
|
root_url = 'https://research.nvidia.com'
|
|
d = pq(root_url +'/publications')
|
|
|
|
fg = FeedGenerator()
|
|
fg.id(root_url)
|
|
fg.title('NVidia Research')
|
|
fg.link(href=root_url, rel='alternate')
|
|
fg.logo(root_url + '/favicon.ico')
|
|
fg.description('NVidia Research papers')
|
|
|
|
for elem in d('.views-field-title').items():
|
|
link = elem.find('a')
|
|
url = root_url + link.attr.href
|
|
title = link.text()
|
|
|
|
fe = fg.add_entry()
|
|
fe.id(url)
|
|
fe.title(title)
|
|
fe.link(href=url)
|
|
|
|
return fg.rss_str()
|
|
|
|
|