import youtube_dl from llamedl.downloaders.youtubedownloader import YouTubeDownloader from llamedl.progress_logger import progresslogger from llamedl.utill import YTLogger, create_filename, create_logger LOGGER = create_logger(__name__) class SoundcloudDownloader(YouTubeDownloader): """Module to get information about youtube url, and download audio.""" def get_title(self, url): """Get title for video from url given to url_info. Original title will be fixed, and neccessary descriptions will be removed. :return: Refactored title """ url_info = self.get_url_info(url) title = f"{url_info.get('uploader')} - {url_info.get('title')}" return create_filename(title)
import os import fire from llamedl.downloaders.downloader import Downloader from llamedl.tagsproviders.tagger import Tagger from llamedl.urlproviders.chromeurls import ChromeUrl from llamedl.urlproviders.netscapefileurl import NetscapeFileUrl from llamedl.urlproviders.userurl import UserUrl from llamedl.utill import create_logger LOGGER = create_logger("LlameDL") class LlameDLFire: """ LlameDL Download your music from URLs Use -- --help flag for more information """ def __init__(self, tags_file="", download_directory=""): """ :param tags_file: Path to YAML file with artist:tags variables :param download_directory: Directory where audio files will be saved """ download_directory = ( "{}/Music".format(os.getenv("HOME")) if not download_directory