mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-13 06:34:25 -04:00
add dedicated shaarli rss parser
This commit is contained in:
parent
522b6288c1
commit
ca8f57ef5c
2 changed files with 44 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue