Incorporated The-Compilers suggested chanes.
This commit is contained in:
parent
1cbc555933
commit
6ffcb387eb
@ -31,9 +31,8 @@ import re
|
|||||||
|
|
||||||
from bs4 import BeautifulSoup
|
from bs4 import BeautifulSoup
|
||||||
|
|
||||||
if os.environ['QUTE_HTML']:
|
with open(os.environ['QUTE_HTML'], 'r') as f:
|
||||||
soup = BeautifulSoup(open(os.environ['QUTE_HTML'], 'r'))
|
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' % link.get('href'))
|
||||||
f.close()
|
|
||||||
|
Loading…
Reference in New Issue
Block a user