Added soundcloud support
This commit is contained in:
@@ -3,6 +3,7 @@ import validators
|
|||||||
from modules.config import Config
|
from modules.config import Config
|
||||||
import pafy
|
import pafy
|
||||||
import hashlib
|
import hashlib
|
||||||
|
import sclib
|
||||||
import os
|
import os
|
||||||
from modules.spotify.spotify_dl import Spotify
|
from modules.spotify.spotify_dl import Spotify
|
||||||
from modules.anonfiles.anonfiles import Anonfiles
|
from modules.anonfiles.anonfiles import Anonfiles
|
||||||
@@ -18,6 +19,8 @@ def get_raw_link(url):
|
|||||||
url = pafy.new(url).getbestaudio().url
|
url = pafy.new(url).getbestaudio().url
|
||||||
if 'anonfiles' in url.lower():
|
if 'anonfiles' in url.lower():
|
||||||
url = urllib.parse.quote(Anonfiles.get_direct(url), safe=':/')
|
url = urllib.parse.quote(Anonfiles.get_direct(url), safe=':/')
|
||||||
|
if 'soundcloud' in url.lower():
|
||||||
|
url = sclib.SoundcloudAPI().resolve(url).get_stream_url()
|
||||||
|
|
||||||
return url
|
return url
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ validators
|
|||||||
pydub
|
pydub
|
||||||
pafy
|
pafy
|
||||||
youtube-dl==2020.12.2
|
youtube-dl==2020.12.2
|
||||||
|
soundcloud-lib
|
||||||
ezzthread
|
ezzthread
|
||||||
qt-thread-updater
|
qt-thread-updater
|
||||||
Direct-Download
|
Direct-Download
|
||||||
|
|||||||
Reference in New Issue
Block a user