summaryrefslogtreecommitdiff
path: root/bandcamp.py
diff options
context:
space:
mode:
authorPawky Languish2025-04-19 19:07:38 +0000
committerPawky Languish2025-04-19 19:07:38 +0000
commitf4fb34dde6b03fdb49f71476d587c5c7f986b565 (patch)
treeef8cc174c413dcd766754bc51c52b9a2fc328e5c /bandcamp.py
parent12062621d6d67adb8abee962f4201e2d5196f55b (diff)
idk some changes lol, formatting and stuff
Diffstat (limited to 'bandcamp.py')
-rwxr-xr-xbandcamp.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/bandcamp.py b/bandcamp.py
index 2d76b22..727181d 100755
--- a/bandcamp.py
+++ b/bandcamp.py
@@ -13,12 +13,7 @@ class Bandcamp:
self.util.mesg(msg, t)
def match_urls(self, str):
- r = [
- i
- for i in str.split()
- if "https://" in i
- and ("bandcamp.com/album/" in i or "bandcamp.com/track/" in i)
- ]
+ r = [i for i in str.split() if "https://" in i and ("bandcamp.com/album/" in i or "bandcamp.com/track/" in i)]
r = list(dict.fromkeys(r))
n = 0
for i in r:
@@ -53,7 +48,9 @@ class Bandcamp:
p = self.parseprop()
data = urlopen(url).read().decode()
p.feed(data)
- irc_string = "[\x0304BandCamp\x03] \x0307ERROR:\x0308 got no data from server! \x0315(check your URL for typos!)\x03"
+ irc_string = (
+ "[\x0304BandCamp\x03] \x0307ERROR:\x0308 got no data from server! \x0315(check your URL for typos!)\x03"
+ )
ansi_string = "[\x1b[31mBandCamp\x1b[0m] \x1b[33;2mERROR:\x1b[33;1m got no data from server! \x1b[37;2m(check your URL for typos!)\x1b[0m"
data = json.loads(Bandcamp.ldjson)
try: