fix: wrong creation of source types
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/pr/woodpecker Pipeline was successful

This commit is contained in:
2024-05-15 14:21:15 +02:00
parent 017752c4d0
commit 98afe5047d
4 changed files with 17 additions and 7 deletions

View File

@@ -22,7 +22,7 @@ from ..utils import output, BColors
from ..utils.string_processing import fit_to_file_system
from ..utils.config import youtube_settings, main_settings
from ..utils.path_manager import LOCATIONS
from ..utils.enums import SourceType
from ..utils.enums import SourceType, ALL_SOURCE_TYPES
from ..utils.support_classes.download_result import DownloadResult
from ..utils.support_classes.query import Query
from ..utils.support_classes.download_result import DownloadResult
@@ -148,7 +148,7 @@ class Pages:
return data_object
def fetch_from_url(self, url: str) -> Optional[DataObject]:
source = Source.match_url(url, SourceType.MANUAL)
source = Source.match_url(url, ALL_SOURCE_TYPES.MANUAL)
if source is None:
return None
@@ -317,7 +317,7 @@ class Pages:
return r
def fetch_url(self, url: str, stop_at_level: int = 2) -> Tuple[Type[Page], DataObject]:
source = Source.match_url(url, SourceType.MANUAL)
source = Source.match_url(url, ALL_SOURCE_TYPES.MANUAL)
if source is None:
raise UrlNotFoundException(url=url)