failed attempts

This commit is contained in:
Hellow
2023-04-23 12:08:39 +02:00
parent 12ef9eb3dd
commit bd3e042ae2
6 changed files with 54 additions and 67 deletions

View File

@@ -6,6 +6,7 @@ from .multiple_options import MultiPageOptions
from ..abstract import Page
from ..support_classes.download_result import DownloadResult
from ...objects import DatabaseObject, Source
from ...utils.enums.source import SourcePages
class Search(Download):
@@ -116,7 +117,7 @@ class Search(Download):
can download directly after
"""
source = Source.match_url(url=url)
source = Source.match_url(url=url, referer_page=SourcePages.MANUAL)
if source is None:
return False

View File

@@ -1039,7 +1039,7 @@ class Musify(Page):
cls.LOGGER.warning(f"The source has no audio link. Falling back to {endpoint}.")
r = cls.CONNECTION.get(endpoint, stream=True, allow_redirects=True, headers={"Host": "40s.musify.club", "Referer": endpoint})
r = cls.CONNECTION.get(endpoint, stream=True, allow_redirects=True, headers={"Connection": "https://musify.club/"})
if r is None:
return DownloadResult(error_message=f"couldn't connect to {endpoint}")