Complete url's in openfeeds
This commit is contained in:
parent
cd5cb2f50d
commit
11075457de
@ -30,9 +30,10 @@ import os
|
|||||||
import re
|
import re
|
||||||
|
|
||||||
from bs4 import BeautifulSoup
|
from bs4 import BeautifulSoup
|
||||||
|
from urllib.parse import urljoin
|
||||||
|
|
||||||
with open(os.environ['QUTE_HTML'], 'r') as f:
|
with open(os.environ['QUTE_HTML'], 'r') as f:
|
||||||
soup = BeautifulSoup(f)
|
soup = BeautifulSoup(f)
|
||||||
with open(os.environ['QUTE_FIFO'], 'w') as 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')):
|
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')))
|
||||||
|
Loading…
Reference in New Issue
Block a user