diff --git a/extra.py b/extra.py index da588e8464b7260330a3eae5b2f3035cbc113d62..3b17bb4074ef982aae1c137f4c8f8bb6e25a3869 100644 --- a/extra.py +++ b/extra.py @@ -47,15 +47,21 @@ def article_to_html(article_text): continue if child.name == 'a': + if 'href' not in child: + continue + child['href'] = child['href'].split('//')[1].strip('www.bilibili.com') continue elif child.name == 'img': - if appconf['proxy']['image']: - child['src'] = '/proxy/pic/' + child['data-src'].split('//')[1] - else: - child['src'] = child['data-src'] - del child['data-src'] - del child['data-size'] + try: + if appconf['proxy']['image']: + child['src'] = '/proxy/pic/' + child['data-src'].split('//')[1] + else: + child['src'] = child['data-src'] + del child['data-src'] + del child['data-size'] + except: + pass continue elif child.name == 'span' and not child.parent in purge_elems: purge_elems.append(child.parent) diff --git a/templates/themes/wayback/read.html b/templates/themes/wayback/read.html index 2a6c55110d10bc3056bd0b90c0b5103a002f391f..d2edf4bcfdee56430ec8deae4fb12f74d2a1235b 100644 --- a/templates/themes/wayback/read.html +++ b/templates/themes/wayback/read.html @@ -3,7 +3,7 @@ {% block head %} <link rel="alternate" href="https://www.bilibili.com/read/{{ cid }}"> <meta name="referrer" content="never"> - <title>专栏 - MikuInvidious</title> + <title>{{ arinfo['title'] }} - 专栏 - MikuInvidious</title> <style> @media only screen and (min-width: 600px) { figure > img {