Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# coding: utf-8
from selenium import webdriver
import re, feedparser, csv
driver = webdriver.Firefox()
for link in driver.find_elements_by_tag_name("link"):
if'rss', link.get_attribute("type")) is not None:
response = feedparser.parse(link.get_attribute('href'))
for entry in response.entries:
with open(response.feed.title + ".csv", "a") as f:
csvWriter = csv.writer(f)
csvWriter.writerow([entry.title.encode('utf_8'),'utf_8'), entry.updated.encode('utf_8')])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment