add dedicated shaarli rss parser

This commit is contained in:
Nick Sweeting 2019-02-04 21:18:42 -08:00
parent 522b6288c1
commit ca8f57ef5c
2 changed files with 44 additions and 1 deletions

View file

@ -233,8 +233,8 @@ def fetch_page_title(url, default=True):
default = url
try:
sys.stdout.write('.')
html_content = urllib.request.urlopen(url, timeout=10).read().decode('utf-8')
match = re.search('<title>(.*?)</title>', html_content)
return match.group(1) if match else default or None
except Exception: