diff --git a/.gitignore b/.gitignore index e8fbbaa8..a7d977e8 100644 --- a/.gitignore +++ b/.gitignore @@ -28,7 +28,8 @@ migrations/ /log log -# conf folder for neodb +# conf folders +/conf /neodb # typesense folder diff --git a/common/static/sass/_Modal.sass b/common/static/sass/_Modal.sass index dda313d5..de31c14b 100644 --- a/common/static/sass/_Modal.sass +++ b/common/static/sass/_Modal.sass @@ -14,6 +14,7 @@ display: none position: fixed width: 500px + max-width: 100vw top: 50% left: 50% transform: translate(-50%, -50%) diff --git a/common/templates/common/search_result.html b/common/templates/common/search_result.html index f8f8708b..d3fc5417 100644 --- a/common/templates/common/search_result.html +++ b/common/templates/common/search_result.html @@ -54,6 +54,22 @@ {% if request.GET.q and user.is_authenticated %}
  • {% trans '正在实时搜索站外条目' %} +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
  • {% endif %} diff --git a/music/management/commands/fix-album-cover.py b/music/management/commands/fix-album-cover.py index 9b9f4d3e..8cd40fdc 100644 --- a/music/management/commands/fix-album-cover.py +++ b/music/management/commands/fix-album-cover.py @@ -100,8 +100,12 @@ class DoubanPatcherMixin: get(url, 60) else: error = error + '\nScraperAPI: ' - # get(f'http://api.scraperapi.com?api_key={settings.SCRAPERAPI_KEY}&url={url}', 60) - get(f'http://api.scrapestack.com/scrape?access_key={settings.SCRAPESTACK_KEY}&url={url}', 60) + + if settings.SCRAPESTACK_KEY is not None: + dl_url = f'http://api.scrapestack.com/scrape?access_key={settings.SCRAPESTACK_KEY}&url={url}' + elif settings.SCRAPERAPI_KEY is not None: + dl_url = f'http://api.scraperapi.com?api_key={settings.SCRAPERAPI_KEY}&url={url}' + get(dl_url, 60) check_content() wayback_cdx() @@ -121,9 +125,11 @@ class DoubanPatcherMixin: ext = None dl_url = url + if settings.SCRAPESTACK_KEY is not None: dl_url = f'http://api.scrapestack.com/scrape?access_key={settings.SCRAPESTACK_KEY}&url={url}' - # f'http://api.scraperapi.com?api_key={settings.SCRAPERAPI_KEY}&url={url}' + elif settings.SCRAPERAPI_KEY is not None: + dl_url = f'http://api.scraperapi.com?api_key={settings.SCRAPERAPI_KEY}&url={url}' try: img_response = requests.get(dl_url, timeout=90)