music-kraken-core/src/actual_donwload.py

55 lines
1.3 KiB
Python
Raw Normal View History

2023-03-30 08:49:17 +00:00
import music_kraken
from music_kraken import pages
2023-04-04 15:34:16 +00:00
from music_kraken.objects import Song, Target, Source, SourcePages, Album
def search_pages():
2023-03-29 11:39:55 +00:00
search = pages.Search()
print("metadata", search.pages)
print("audio", search.audio_pages)
2023-03-29 18:56:57 +00:00
print()
2023-03-28 16:40:56 +00:00
print(search)
2023-03-29 18:56:57 +00:00
2023-04-03 14:46:00 +00:00
search.choose_page(pages.Musify)
2023-03-29 18:56:57 +00:00
2023-03-29 10:00:40 +00:00
print()
print(search)
2023-03-29 18:56:57 +00:00
2023-04-03 14:46:00 +00:00
search.choose_index(0)
2023-03-29 09:53:55 +00:00
print(search)
2023-04-03 14:46:00 +00:00
2023-03-30 10:31:37 +00:00
def direct_download():
search = pages.Search()
2023-04-03 14:46:00 +00:00
2023-03-30 10:31:37 +00:00
search.search_url("https://www.metal-archives.com/bands/Ghost_Bath/3540372489")
print(search)
2023-04-03 14:46:00 +00:00
2023-03-30 10:31:37 +00:00
search.search_url("https://musify.club/artist/ghost-bath-280348")
print(search)
2023-04-03 14:46:00 +00:00
2023-03-30 12:39:28 +00:00
def download_audio():
song = Song(
source_list=[
Source(SourcePages.MUSIFY, "https://musify.club/track/im-in-a-coffin-life-never-was-waste-of-skin-16360302")
],
target_list=[
Target(relative_to_music_dir=True, path="example", file="waste_of_skin_1"),
Target(relative_to_music_dir=True, path="example", file="waste_of_skin_2")
]
)
2023-04-03 14:46:00 +00:00
2023-03-30 12:39:28 +00:00
pages.Musify.download_song(song)
2023-04-04 15:34:16 +00:00
def real_download():
search = pages.Search()
search.search_url("https://musify.club/release/children-of-the-night-2018-1079829")
search.download_chosen()
if __name__ == "__main__":
music_kraken.cli(genre="dsbm")