Merge branch 'paretje-openfeeds'

This commit is contained in:
Florian Bruhin 2016-03-24 23:26:56 +01:00
commit 58363d66ce
2 changed files with 3 additions and 1 deletions

View File

@ -214,6 +214,7 @@ Contributors, sorted by the number of commits in descending order:
* Samuel Loury
* Matthias Lisin
* Marcel Schilling
* Kevin Velghe
* Jean-Christophe Petkovich
* Helen Sherwood-Taylor
* HalosGhost

View File

@ -30,9 +30,10 @@ import os
import re
from bs4 import BeautifulSoup
from urllib.parse import urljoin
with open(os.environ['QUTE_HTML'], 'r') as f:
soup = BeautifulSoup(f)
with open(os.environ['QUTE_FIFO'], 'w') as f:
for link in soup.find_all('link', rel='alternate', type=re.compile(r'application/((rss|rdf|atom)\+)?xml|text/xml')):
f.write('open -t %s\n' % link.get('href'))
f.write('open -t %s\n' % urljoin(os.environ['QUTE_URL'], link.get('href')))