refactor
This commit is contained in:
parent
fa7bfde4a1
commit
e0fb122f4f
Binary file not shown.
BIN
dsbm/K.I.Z/Hurra die Welt geht unter/Verrückt nach dir.mp3.part
Normal file
BIN
dsbm/K.I.Z/Hurra die Welt geht unter/Verrückt nach dir.mp3.part
Normal file
Binary file not shown.
@ -1,7 +1,6 @@
|
|||||||
import requests
|
import requests
|
||||||
import os.path
|
import os.path
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
import mutagen
|
|
||||||
from mutagen.easyid3 import EasyID3
|
from mutagen.easyid3 import EasyID3
|
||||||
from pydub import AudioSegment
|
from pydub import AudioSegment
|
||||||
import json
|
import json
|
||||||
@ -77,37 +76,6 @@ dict_keys(
|
|||||||
])
|
])
|
||||||
"""
|
"""
|
||||||
|
|
||||||
ID3_TAGS = {
|
|
||||||
"TALB": "album",
|
|
||||||
"TBPM": "bpm",
|
|
||||||
"TCMP": "compilation", # iTunes extension
|
|
||||||
"TCOM": "composer",
|
|
||||||
"TCOP": "copyright",
|
|
||||||
"TENC": "encodedby",
|
|
||||||
"TEXT": "lyricist",
|
|
||||||
"TLEN": "length",
|
|
||||||
"TMED": "media",
|
|
||||||
"TMOO": "mood",
|
|
||||||
"TIT1": "grouping",
|
|
||||||
"TIT2": "title",
|
|
||||||
"TIT3": "version",
|
|
||||||
"TPE1": "artist",
|
|
||||||
"TPE2": "albumartist",
|
|
||||||
"TPE3": "conductor",
|
|
||||||
"TPE4": "arranger",
|
|
||||||
"TPOS": "discnumber",
|
|
||||||
"TPUB": "organization",
|
|
||||||
"TRCK": "tracknumber",
|
|
||||||
"TOLY": "author",
|
|
||||||
"TSO2": "albumartistsort", # iTunes extension
|
|
||||||
"TSOA": "albumsort",
|
|
||||||
"TSOC": "composersort", # iTunes extension
|
|
||||||
"TSOP": "artistsort",
|
|
||||||
"TSOT": "titlesort",
|
|
||||||
"TSRC": "isrc",
|
|
||||||
"TSST": "discsubtitle",
|
|
||||||
"TLAN": "language",
|
|
||||||
}
|
|
||||||
|
|
||||||
class Download:
|
class Download:
|
||||||
def __init__(self, session: requests.Session = requests.Session(), file: str = ".cache3.csv", temp: str = "temp"):
|
def __init__(self, session: requests.Session = requests.Session(), file: str = ".cache3.csv", temp: str = "temp"):
|
||||||
@ -164,10 +132,4 @@ class Download:
|
|||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
logging.basicConfig(level=logging.DEBUG)
|
logging.basicConfig(level=logging.DEBUG)
|
||||||
s = requests.Session()
|
s = requests.Session()
|
||||||
if False:
|
|
||||||
proxies = {
|
|
||||||
'http': 'socks5h://127.0.0.1:9150',
|
|
||||||
'https': 'socks5h://127.0.0.1:9150'
|
|
||||||
}
|
|
||||||
s.proxies = proxies
|
|
||||||
Download(session=s)
|
Download(session=s)
|
||||||
|
Loading…
Reference in New Issue
Block a user