<style type="text/css">a[data-mtli~="mtli_filesize497b"]:after {content:" (497 b)"}</style><style type="text/css">a[data-mtli~="mtli_filesize497b"]:after {content:" (497 b)"}</style>{"id":288,"date":"2017-12-12T16:43:13","date_gmt":"2017-12-12T16:43:13","guid":{"rendered":"https:\/\/pandorafms.com\/library\/?p=288"},"modified":"2017-12-13T11:54:43","modified_gmt":"2017-12-13T11:54:43","slug":"rss-reader","status":"publish","type":"post","link":"https:\/\/pandorafms.com\/library\/rss-reader\/","title":{"rendered":"RSS reader"},"content":{"rendered":"<p class=\"description_pui\">This is a python rss reader that can be used with other programs like Conky.<\/p>\n<h2>Module data<\/h2>\n<pre>#!\/bin\/python\u00a0\r\n\r\nimport feedparser\u00a0\r\nimport re\u00a0\r\n\r\nrss_url = \"your.pandora.rss\/feed\"\u00a0\r\n\r\nfeed = feedparser.parse( rss_url )\u00a0\r\n\r\nfor x in xrange(0,10):\u00a0\r\nfeed_date=feed['items'][ x ].date\u00a0\r\nfeed_date=feed_date.split(' ')[2] + \" \" + feed_date.split(' ')[1] + \" \" + feed_date.split(' ')[4]\u00a0\r\nfeed_title=feed['items'][ x ].title\u00a0\r\nfeed_description=feed['items'][ x ].description\u00a0\r\nlist_feed=feed_date + \" | \" + feed_title + \" | \" + feed_description\u00a0\r\nlist_feed=re.sub(r' ', ' ', list_feed)\u00a0\r\nprint \"* \" + list_feed\r\n<\/pre>\n<h2>Files:<\/h2>\n<p><a href=\"\/library\/files_repository\/1326814524.altsysrq.rss-reader.py\" class=\"mtli_attachment mtli_py\" data-mtli=\"mtli_filesize497b\">rss-reader.py<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is a python rss reader that can be used with other programs like Conky. Module data #!\/bin\/python\u00a0 import feedparser\u00a0 import re\u00a0 rss_url = &#8220;your.pandora.rss\/feed&#8221;\u00a0 feed = feedparser.parse( rss_url )\u00a0 for x in xrange(0,10):\u00a0 feed_date=feed[&#8216;items&#8217;][ x ].date\u00a0 feed_date=feed_date.split(&#8216; &#8216;)[2] + &#8221; &#8221; + feed_date.split(&#8216; &#8216;)[1] + &#8221; &#8221; + feed_date.split(&#8216; &#8216;)[4]\u00a0 feed_title=feed[&#8216;items&#8217;][ x ].title\u00a0 feed_description=feed[&#8216;items&#8217;][ [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[4],"tags":[55],"_links":{"self":[{"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/posts\/288"}],"collection":[{"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/comments?post=288"}],"version-history":[{"count":0,"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/posts\/288\/revisions"}],"wp:attachment":[{"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/media?parent=288"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/categories?post=288"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/tags?post=288"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}