summary refs log tree commit diff
path: root/soundcloud.py
diff options
context:
space:
mode:
authorPawky Languish2024-11-28 03:51:42 +0000
committerPawky Languish2024-11-28 03:51:42 +0000
commit3a6db0d0d3b9e2ce250c4c9c020d7ece4e953b13 (patch)
treebd0fb27cb5e441ff057a723b6a332cfcacf17dad /soundcloud.py
parent763f96948f39a20d79f7ec68a924966c2b3db761 (diff)
make cli initialize class properly >_>
Diffstat (limited to 'soundcloud.py')
-rwxr-xr-xsoundcloud.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/soundcloud.py b/soundcloud.py
index a1f5f91..4b6e717 100755
--- a/soundcloud.py
+++ b/soundcloud.py
@@ -29,7 +29,7 @@ class SoundCloud:
         url = f"https://soundcloud.com/oembed?{urlencode([('url',url),('format','json')])}"
         data = urlopen(url).read().decode()
         data = json_loads(data)
-        #print(data)
+        # print(data)
         # print(data["title"].removesuffix(" by "+data["author_name"]),data["author_name"])
         try:
             artist = data["author_name"]
@@ -37,7 +37,7 @@ class SoundCloud:
         except KeyError:
             title = ""
             artist = ""
-        #print(title.removesuffix(" by " + artist), "|", artist)
+        # print(title.removesuffix(" by " + artist), "|", artist)
         if title == "":
             irc_string = "[\x0304SoundCloud\x03] \x0307ERROR:\x0308 got no data from server! \x0315(check your URL for typos!)\x03"
             ansi_string = "[\x1b[31mSoundCloud\x1b[0m] \x1b[33;2mERROR:\x1b[33;1m got no data from server! \x1b[37;2m(check your URL for typos!)\x1b[0m"
@@ -56,4 +56,5 @@ class SoundCloud:
 if __name__ == "__main__":
     import sys
 
-    SoundCloud.soundcloud(SoundCloud, sys.argv[1])
+    #SoundCloud.soundcloud(SoundCloud, sys.argv[1])
+    SoundCloud().soundcloud(sys.argv[1])