added logger
This commit is contained in:
parent
fa63eba982
commit
d10b4fc1a1
@ -3,7 +3,7 @@ from urllib.parse import urlparse
|
||||
import logging
|
||||
import json
|
||||
|
||||
from music_kraken.utils.shared import PROXIES_LIST, YOUTUBE_LOGGER
|
||||
from music_kraken.utils.shared import PROXIES_LIST, YOUTUBE_MUSIC_LOGGER
|
||||
|
||||
|
||||
from ..objects import Source, DatabaseObject
|
||||
@ -62,7 +62,7 @@ class YoutubeMusicConnection(Connection):
|
||||
class YoutubeMusic(Page):
|
||||
# CHANGE
|
||||
SOURCE_TYPE = SourcePages.PRESET
|
||||
LOGGER = YOUTUBE_LOGGER
|
||||
LOGGER = YOUTUBE_MUSIC_LOGGER
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.connection: YoutubeMusicConnection = YoutubeMusicConnection(logger=self.LOGGER)
|
||||
|
@ -90,6 +90,11 @@ class LoggingSection(Section):
|
||||
description="The logger for the youtube scraper.",
|
||||
value="youtube"
|
||||
)
|
||||
self.YOUTUBE_MUSIC_LOGGER = LoggerAttribute(
|
||||
name="youtube_music_logger",
|
||||
description="The logger for the youtube music scraper.\n(The scraper is seperate to the youtube scraper)",
|
||||
value="youtube_music"
|
||||
)
|
||||
self.ENCYCLOPAEDIA_METALLUM_LOGGER = LoggerAttribute(
|
||||
name="metal_archives_logger",
|
||||
description="The logger for the metal archives scraper.",
|
||||
@ -114,6 +119,7 @@ class LoggingSection(Section):
|
||||
self.DATABASE_LOGGER,
|
||||
self.MUSIFY_LOGGER,
|
||||
self.YOUTUBE_LOGGER,
|
||||
self.YOUTUBE_MUSIC_LOGGER,
|
||||
self.ENCYCLOPAEDIA_METALLUM_LOGGER,
|
||||
self.GENIUS_LOGGER
|
||||
]
|
||||
|
@ -53,6 +53,7 @@ OBJECT_LOGGER = LOGGING_SECTION.OBJECT_LOGGER.object_from_value
|
||||
DATABASE_LOGGER = LOGGING_SECTION.DATABASE_LOGGER.object_from_value
|
||||
|
||||
YOUTUBE_LOGGER = LOGGING_SECTION.YOUTUBE_LOGGER.object_from_value
|
||||
YOUTUBE_MUSIC_LOGGER = LOGGING_SECTION.YOUTUBE_MUSIC_LOGGER.object_from_value
|
||||
MUSIFY_LOGGER = LOGGING_SECTION.MUSIFY_LOGGER.object_from_value
|
||||
GENIUS_LOGGER = LOGGING_SECTION.GENIUS_LOGGER
|
||||
ENCYCLOPAEDIA_METALLUM_LOGGER = LOGGING_SECTION.ENCYCLOPAEDIA_METALLUM_LOGGER.object_from_value
|
||||
|
Loading…
Reference in New Issue
Block a user