removed unnecesarry file

This commit is contained in:
Lars Noack 2022-11-08 11:30:54 +01:00
parent a6df17ab86
commit 452c1b5eea
7 changed files with 18 additions and 22 deletions

View File

@ -1,12 +0,0 @@
import requests
API_ENDPOINT = "https://slavart.gamesdrive.net/api/search?q=Tekkno"
DOWNLOAD_ENDPOINT = "https://slavart-api.gamesdrive.net/api/download/track?id=153182274"
if __name__ == "__main__":
r = requests.get(DOWNLOAD_ENDPOINT, headers={
"Access-Control-Allow-Origin": "https://slavart.gamesdrive.net/"
})
print(r.status_code)
print(r.text)

View File

@ -5,8 +5,7 @@ from mutagen.easyid3 import EasyID3
from pydub import AudioSegment from pydub import AudioSegment
import logging import logging
import musify from scraping import musify, youtube_music
import youtube_music
""" """
https://en.wikipedia.org/wiki/ID3 https://en.wikipedia.org/wiki/ID3

View File

@ -1,8 +1,8 @@
import requests import requests
import os
import logging import logging
import musify from scraping import musify, youtube_music
import youtube_music
class Download: class Download:
@ -18,6 +18,9 @@ class Download:
row['artists'] = [artist['name'] for artist in row['artists']] row['artists'] = [artist['name'] for artist in row['artists']]
id_ = row['id'] id_ = row['id']
if os.path.exists(os.path.join(os.path.expanduser('~/Music'), row['file'])):
self.logger.info(f"skipping the fetching of the download links, cuz {row['file']} already exists.")
continue
# check YouTube # check YouTube
youtube_url = youtube_music.get_youtube_url(row) youtube_url = youtube_music.get_youtube_url(row)

View File

@ -111,13 +111,13 @@ def cli(start_at: int = 0):
metadata_downloader.download(search) metadata_downloader.download(search)
if start_at <= 1: if start_at <= 1:
logging.info("Fetching Download Links")
download_links.Download(database, METADATA_DOWNLOAD_LOGGER, proxies=proxies)
if start_at <= 2:
logging.info("creating Paths") logging.info("creating Paths")
url_to_path.UrlPath(database, PATH_LOGGER, genre=genre) url_to_path.UrlPath(database, PATH_LOGGER, genre=genre)
if start_at <= 2:
logging.info("Fetching Download Links")
download_links.Download(database, METADATA_DOWNLOAD_LOGGER, proxies=proxies)
if start_at <= 3: if start_at <= 3:
logging.info("starting to download the mp3's") logging.info("starting to download the mp3's")
download.Download(database, DOWNLOAD_LOGGER, proxies=proxies, base_path=MUSIC_DIR) download.Download(database, DOWNLOAD_LOGGER, proxies=proxies, base_path=MUSIC_DIR)

View File

@ -4,7 +4,10 @@ import time
import requests import requests
import bs4 import bs4
try:
import phonetic_compares import phonetic_compares
except ModuleNotFoundError:
from scraping import phonetic_compares
TRIES = 5 TRIES = 5
TIMEOUT = 10 TIMEOUT = 10

View File

@ -3,7 +3,10 @@ import pandas as pd
import logging import logging
import time import time
try:
import phonetic_compares import phonetic_compares
except ModuleNotFoundError:
from scraping import phonetic_compares
YDL_OPTIONS = {'format': 'bestaudio', 'noplaylist': 'True'} YDL_OPTIONS = {'format': 'bestaudio', 'noplaylist': 'True'}
YOUTUBE_URL_KEY = 'webpage_url' YOUTUBE_URL_KEY = 'webpage_url'