From efc63b99ce7e78b352e2ba22d5e51f83445546d7 Mon Sep 17 00:00:00 2001 From: Rich Jones Date: Mon, 5 Feb 2018 18:30:23 -0500 Subject: [PATCH 01/13] 0.31.2 - steal some keys --- soundscrape/__init__.py | 2 +- soundscrape/soundscrape.py | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/soundscrape/__init__.py b/soundscrape/__init__.py index b4cc240..8ada23a 100644 --- a/soundscrape/__init__.py +++ b/soundscrape/__init__.py @@ -1 +1 @@ -__version__ = '0.30.1' +__version__ = '0.30.2' diff --git a/soundscrape/soundscrape.py b/soundscrape/soundscrape.py index 4132423..33cf39b 100755 --- a/soundscrape/soundscrape.py +++ b/soundscrape/soundscrape.py @@ -22,8 +22,8 @@ #################################################################### # Please be nice with this! -CLIENT_ID = '175c043157ffae2c6d5fed16c3d95a4c' -CLIENT_SECRET = '99a51990bd81b6a82c901d4cc6828e46' +CLIENT_ID = 'a3dd183a357fcff9a6943c0d65664087' +CLIENT_SECRET = '7e10d33e967ad42574124977cf7fa4b7' MAGIC_CLIENT_ID = 'b45b1aa10f1ac2941910a7f0d10f8e28' AGGRESSIVE_CLIENT_ID = 'OmTFHKYSMLFqnu2HHucmclAptedxWXkq' @@ -219,7 +219,7 @@ def process_soundcloud(vargs): tagged = tag_file(filename, artist=track_data['artist'], title=track_data['title'], - year='2016', + year='2018', genre='', album='', artwork_url='') @@ -232,6 +232,7 @@ def process_soundcloud(vargs): filenames.append(filename) else: + aggressive = False # This is is likely a 'likes' page. @@ -267,6 +268,7 @@ def process_soundcloud(vargs): aggressive = True filenames = [] + # this might be buggy data = get_soundcloud_api2_data(artist_id) for track in data['collection']: @@ -431,6 +433,8 @@ def download_tracks(client, tracks, num_tracks=sys.maxsize, downloadable=False, continue puts_safe(colored.green("Downloading") + colored.white(": " + track['title'])) + + if track.get('direct', False): location = track['stream_url'] else: From 9864ac97f994209b0690fd69ead0c3d2e7351b8d Mon Sep 17 00:00:00 2001 From: Rich Jones Date: Tue, 14 Jan 2020 12:28:12 -0500 Subject: [PATCH 02/13] bad force --- soundscrape/soundscrape.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soundscrape/soundscrape.py b/soundscrape/soundscrape.py index 33cf39b..397ca71 100755 --- a/soundscrape/soundscrape.py +++ b/soundscrape/soundscrape.py @@ -461,7 +461,7 @@ def download_tracks(client, tracks, num_tracks=sys.maxsize, downloadable=False, filenames.append(filename) except Exception as e: puts_safe(colored.red("Problem downloading ") + colored.white(track['title'])) - puts_safe(e) + puts_safe(str(e)) return filenames From 1ca60771dc48eece0ed55ed8aac0c6bad64f98cd Mon Sep 17 00:00:00 2001 From: Jakob Hoeper Date: Thu, 22 Oct 2020 16:19:14 +0200 Subject: [PATCH 03/13] new bandcamp JSON extraction function --- soundscrape/soundscrape.py | 67 ++++++++++++++++++++++++++++---------- 1 file changed, 49 insertions(+), 18 deletions(-) diff --git a/soundscrape/soundscrape.py b/soundscrape/soundscrape.py index 397ca71..bc3867c 100755 --- a/soundscrape/soundscrape.py +++ b/soundscrape/soundscrape.py @@ -583,8 +583,8 @@ def scrape_bandcamp_url(url, num_tracks=sys.maxsize, folders=False, custom_path= filenames.append(scrape_bandcamp_url(album_url, num_tracks, folders, custom_path)) return filenames - artist = album_data["artist"] - album_name = album_data["album_name"] + artist = album_data.get("artist") + album_name = album_data.get("album_title") if folders: if album_name: @@ -651,21 +651,60 @@ def scrape_bandcamp_url(url, num_tracks=sys.maxsize, folders=False, custom_path= return filenames +def extract_embedded_json_from_attribute( + request: requests.Response, + attribute: str, + debug: bool = False, +) -> dict: + """ + Extract JSON object embedded in an element's attribute value. + + The JSON is "sloppy". The native python JSON parser often can't deal, + so we use the more tolerant demjson instead. + + :param request: a request response object + :param attribute: attribute name (e.g. ``data-tralbum``) + :param debug: whether to print debug messages + :return: embedded JSON as a dict, or None on fail + """ + try: + embed = request.text.split('{}="'.format(attribute))[1] + embed = embed.split('"')[0].replace('"', '"') + output = demjson.decode(embed) + if debug: + print( + 'extracted JSON: ' + + demjson.encode( + output, + compactly=False, + indent_amount=2, + ) + ) + except Exception as e: + output = None + if debug: + print(e) + return output + + def get_bandcamp_metadata(url): """ - Read information from the Bandcamp JavaScript object. + Read information from Bandcamp embedded JavaScript object notation. The method may return a list of URLs (indicating this is probably a "main" page which links to one or more albums), or a JSON if we can already parse album/track info from the given url. - The JSON is "sloppy". The native python JSON parser often can't deal, so we use the more tolerant demjson instead. """ request = requests.get(url) try: - sloppy_json = request.text.split("var TralbumData = ") - sloppy_json = sloppy_json[1].replace('" + "', "") - sloppy_json = sloppy_json.replace("'", "\'") - sloppy_json = sloppy_json.split("};")[0] + "};" - sloppy_json = sloppy_json.replace("};", "}") - output = demjson.decode(sloppy_json) + track_data, album_data = ( + extract_embedded_json_from_attribute( + request, attr, debug=False + ) + for attr in ['data-tralbum', 'data-embed'] + ) + output = { + **track_data, + **album_data, + } # if the JSON parser failed, we should consider it's a "/music" page, # so we generate a list of albums/tracks and return it immediately except Exception as e: @@ -684,14 +723,6 @@ def get_bandcamp_metadata(url): # according to http://stackoverflow.com/a/7323861 # (very unlikely, but better safe than sorry!) output['genre'] = ' '.join(s for s in tags) - # make sure we always get the correct album name, even if this is a - # track URL (unless this track does not belong to any album, in which - # case the album name remains set as None. - output['album_name'] = None - regex_album_name = r'album_title\s*:\s*"([^"]+)"\s*,' - match = re.search(regex_album_name, request.text, re.MULTILINE) - if match: - output['album_name'] = match.group(1) try: artUrl = request.text.split("\"tralbumArt\">")[1].split("\">")[0].split("href=\"")[1] From e8335b39817df43f5ccfd25d4920da6c91c53b7a Mon Sep 17 00:00:00 2001 From: Jakob Hoeper Date: Thu, 22 Oct 2020 16:41:01 +0200 Subject: [PATCH 04/13] change docstring to google style --- soundscrape/soundscrape.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/soundscrape/soundscrape.py b/soundscrape/soundscrape.py index bc3867c..2b39d45 100755 --- a/soundscrape/soundscrape.py +++ b/soundscrape/soundscrape.py @@ -651,21 +651,20 @@ def scrape_bandcamp_url(url, num_tracks=sys.maxsize, folders=False, custom_path= return filenames -def extract_embedded_json_from_attribute( - request: requests.Response, - attribute: str, - debug: bool = False, -) -> dict: +def extract_embedded_json_from_attribute(request, attribute, debug=False): """ Extract JSON object embedded in an element's attribute value. The JSON is "sloppy". The native python JSON parser often can't deal, so we use the more tolerant demjson instead. - :param request: a request response object - :param attribute: attribute name (e.g. ``data-tralbum``) - :param debug: whether to print debug messages - :return: embedded JSON as a dict, or None on fail + Args: + request (obj:`requests.Response`): HTTP GET response from which to extract + attribute (str): name of the attribute holding the desired JSON object + debug (bool, optional): whether to print debug messages + + Returns: + The embedded JSON object as a dict, or None if extraction failed """ try: embed = request.text.split('{}="'.format(attribute))[1] From d5a2097bd7476fe9724d0adb3e0601fd43df33ea Mon Sep 17 00:00:00 2001 From: Jakob Hoeper Date: Thu, 22 Oct 2020 17:34:40 +0200 Subject: [PATCH 05/13] fix travis setup --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index eebb013..7774cc1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,9 @@ language: python python: - "2.7" - - "3.3" - "3.4" - "3.5" + - "3.8" # command to install dependencies install: # - "pip install -r requirements.txt" From 8451105e749e0dbb4d569f40c90437e079c2dbd3 Mon Sep 17 00:00:00 2001 From: Jakob Hoeper Date: Thu, 22 Oct 2020 17:40:34 +0200 Subject: [PATCH 06/13] make backwards compatible --- soundscrape/soundscrape.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/soundscrape/soundscrape.py b/soundscrape/soundscrape.py index 2b39d45..2a11fa8 100755 --- a/soundscrape/soundscrape.py +++ b/soundscrape/soundscrape.py @@ -693,17 +693,14 @@ def get_bandcamp_metadata(url): or a JSON if we can already parse album/track info from the given url. """ request = requests.get(url) + output = {} try: - track_data, album_data = ( - extract_embedded_json_from_attribute( - request, attr, debug=False + for attr in ['data-tralbum', 'data-embed']: + output.update( + extract_embedded_json_from_attribute( + request, attr, debug=True + ) ) - for attr in ['data-tralbum', 'data-embed'] - ) - output = { - **track_data, - **album_data, - } # if the JSON parser failed, we should consider it's a "/music" page, # so we generate a list of albums/tracks and return it immediately except Exception as e: From 48eb524e75578bc418fc4e315846c8f151aa8f06 Mon Sep 17 00:00:00 2001 From: Jakob Hoeper Date: Thu, 22 Oct 2020 19:05:21 +0200 Subject: [PATCH 07/13] Remove support for Python 2.7 > DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support --- .travis.yml | 1 - README.md | 2 +- setup.py | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7774cc1..fae36db 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,5 @@ language: python python: - - "2.7" - "3.4" - "3.5" - "3.8" diff --git a/README.md b/README.md index 139d58a..9f2a37d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ![SoundScrape!](http://i.imgur.com/nHAt2ow.png) -SoundScrape [![Build Status](https://travis-ci.org/Miserlou/SoundScrape.svg)](https://travis-ci.org/Miserlou/SoundScrape) [![Python 2](https://img.shields.io/badge/Python-2-brightgreen.svg)](https://pypi.python.org/pypi/soundscrape/) [![Python 3](https://img.shields.io/badge/Python-3-brightgreen.svg)](https://pypi.python.org/pypi/soundscrape/) [![PyPI](https://img.shields.io/pypi/v/soundscrape.svg)](https://pypi.python.org/pypi/SoundScrape) +SoundScrape [![Build Status](https://travis-ci.org/Miserlou/SoundScrape.svg)](https://travis-ci.org/Miserlou/SoundScrape) [![Python 3](https://img.shields.io/badge/Python-3-brightgreen.svg)](https://pypi.python.org/pypi/soundscrape/) [![PyPI](https://img.shields.io/pypi/v/soundscrape.svg)](https://pypi.python.org/pypi/SoundScrape) ============== **SoundScrape** makes it super easy to download artists from SoundCloud (and Bandcamp and MixCloud) - even those which don't have download links! It automatically creates ID3 tags as well (including album art), which is handy. diff --git a/setup.py b/setup.py index 6c9851a..ec58387 100644 --- a/setup.py +++ b/setup.py @@ -48,10 +48,10 @@ 'License :: OSI Approved :: Apache Software License', 'Operating System :: OS Independent', 'Programming Language :: Python', - 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.8', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', ], From 9464ba0f627a84edda0a26949ef4b3b4bedefebc Mon Sep 17 00:00:00 2001 From: Jakob Hoeper Date: Thu, 22 Oct 2020 19:06:21 +0200 Subject: [PATCH 08/13] rm debug messages --- soundscrape/soundscrape.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soundscrape/soundscrape.py b/soundscrape/soundscrape.py index 2a11fa8..3695c9b 100755 --- a/soundscrape/soundscrape.py +++ b/soundscrape/soundscrape.py @@ -698,7 +698,7 @@ def get_bandcamp_metadata(url): for attr in ['data-tralbum', 'data-embed']: output.update( extract_embedded_json_from_attribute( - request, attr, debug=True + request, attr ) ) # if the JSON parser failed, we should consider it's a "/music" page, From 807a65e9efe5b7c3576cbae13730bfb174d1e626 Mon Sep 17 00:00:00 2001 From: Jakob Hoeper Date: Thu, 29 Oct 2020 00:08:36 +0100 Subject: [PATCH 09/13] fix html entities in track metadata & file names --- setup.py | 2 +- soundscrape/soundscrape.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index ec58387..3730002 100644 --- a/setup.py +++ b/setup.py @@ -48,9 +48,9 @@ 'License :: OSI Approved :: Apache Software License', 'Operating System :: OS Independent', 'Programming Language :: Python', - 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', diff --git a/soundscrape/soundscrape.py b/soundscrape/soundscrape.py index 3695c9b..ddd6fd8 100755 --- a/soundscrape/soundscrape.py +++ b/soundscrape/soundscrape.py @@ -3,6 +3,7 @@ import argparse import demjson +import html import os import re import requests @@ -668,7 +669,9 @@ def extract_embedded_json_from_attribute(request, attribute, debug=False): """ try: embed = request.text.split('{}="'.format(attribute))[1] - embed = embed.split('"')[0].replace('"', '"') + embed = html.unescape( + embed.split('"')[0] + ) output = demjson.decode(embed) if debug: print( From 3ae56858b358c2e665522b9c0e48d42fabeb3764 Mon Sep 17 00:00:00 2001 From: Jakob Hoeper Date: Sun, 15 Nov 2020 17:38:10 +0100 Subject: [PATCH 10/13] bring back Python 3.3 support --- .travis.yml | 3 ++- setup.py | 2 ++ soundscrape/soundscrape.py | 22 +++++++++++++++++----- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index fae36db..6cbc14b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,12 @@ language: python python: + - "3.3" - "3.4" - "3.5" - "3.8" + - "3.9" # command to install dependencies install: -# - "pip install -r requirements.txt" - "pip install setuptools --upgrade; python setup.py install" # command to run tests script: nosetests diff --git a/setup.py b/setup.py index 3730002..cd26b50 100644 --- a/setup.py +++ b/setup.py @@ -48,10 +48,12 @@ 'License :: OSI Approved :: Apache Software License', 'Operating System :: OS Independent', 'Programming Language :: Python', + 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', ], diff --git a/soundscrape/soundscrape.py b/soundscrape/soundscrape.py index ddd6fd8..849f543 100755 --- a/soundscrape/soundscrape.py +++ b/soundscrape/soundscrape.py @@ -1,6 +1,4 @@ #! /usr/bin/env python -from __future__ import unicode_literals - import argparse import demjson import html @@ -20,6 +18,11 @@ from os.path import dirname, exists, join from os import access, mkdir, W_OK +if sys.version_info.minor < 4: + html_unescape = html.parser.HTMLParser().unescape +else: + html_unescape = html.unescape + #################################################################### # Please be nice with this! @@ -546,7 +549,12 @@ def process_bandcamp(vargs): else: bc_url = 'https://' + artist_url + '.bandcamp.com/music' - filenames = scrape_bandcamp_url(bc_url, num_tracks=vargs['num_tracks'], folders=vargs['folders'], custom_path=vargs['path']) + filenames = scrape_bandcamp_url( + bc_url, + num_tracks=vargs['num_tracks'], + folders=vargs['folders'], + custom_path=vargs['path'], + ) # check if we have lists inside a list, which indicates the # scraping has gone recursive, so we must format the output @@ -581,7 +589,11 @@ def scrape_bandcamp_url(url, num_tracks=sys.maxsize, folders=False, custom_path= # so we call the scrape_bandcamp_url() method for each one if type(album_data) is list: for album_url in album_data: - filenames.append(scrape_bandcamp_url(album_url, num_tracks, folders, custom_path)) + filenames.append( + scrape_bandcamp_url( + album_url, num_tracks, folders, custom_path + ) + ) return filenames artist = album_data.get("artist") @@ -669,7 +681,7 @@ def extract_embedded_json_from_attribute(request, attribute, debug=False): """ try: embed = request.text.split('{}="'.format(attribute))[1] - embed = html.unescape( + embed = html_unescape( embed.split('"')[0] ) output = demjson.decode(embed) From a73969ef5db73cfa7b6e35bcdd1f84bef317594e Mon Sep 17 00:00:00 2001 From: Jakob Hoeper Date: Sun, 15 Nov 2020 17:38:51 +0100 Subject: [PATCH 11/13] test track data containing html entity --- tests/test.py | 86 ++++++++++++++++++++++----------------------------- 1 file changed, 37 insertions(+), 49 deletions(-) diff --git a/tests/test.py b/tests/test.py index 626bf4b..1ec1a54 100644 --- a/tests/test.py +++ b/tests/test.py @@ -1,21 +1,20 @@ import glob import os -import re -import string import sys import unittest -import nose -from nose import case -from nose.pyversion import unbound_method -from nose import util - +from mutagen.mp3 import EasyMP3 from soundscrape.soundscrape import get_client from soundscrape.soundscrape import process_soundcloud from soundscrape.soundscrape import process_bandcamp -from soundscrape.soundscrape import process_mixcloud -from soundscrape.soundscrape import process_audiomack -from soundscrape.soundscrape import process_musicbed + + +def rm_mp3(): + """ deletes all ``*.mp3`` files in current directory + """ + for f in glob.glob('*.mp3'): + os.unlink(f) + class TestSoundscrape(unittest.TestCase): @@ -31,45 +30,33 @@ def test_get_client(self): self.assertTrue(bool(client)) def test_soundcloud(self): - for f in glob.glob('*.mp3'): - os.unlink(f) - + rm_mp3() mp3_count = len(glob.glob1('', "*.mp3")) vargs = {'path':'', 'folders': False, 'group': False, 'track': '', 'num_tracks': 9223372036854775807, 'bandcamp': False, 'downloadable': False, 'likes': False, 'open': False, 'artist_url': 'https://soundcloud.com/fzpz/revised', 'keep': True} process_soundcloud(vargs) new_mp3_count = len(glob.glob1('', "*.mp3")) self.assertTrue(new_mp3_count > mp3_count) - - for f in glob.glob('*.mp3'): - os.unlink(f) + rm_mp3() def test_soundcloud_hard(self): - for f in glob.glob('*.mp3'): - os.unlink(f) - + rm_mp3() mp3_count = len(glob.glob1('', "*.mp3")) vargs = {'path':'', 'folders': False, 'group': False, 'track': '', 'num_tracks': 1, 'bandcamp': False, 'downloadable': False, 'likes': False, 'open': False, 'artist_url': 'puptheband', 'keep': False} process_soundcloud(vargs) new_mp3_count = len(glob.glob1('', "*.mp3")) self.assertTrue(new_mp3_count > mp3_count) self.assertTrue(new_mp3_count == 1) # This used to be 3, but is now 'Not available in United States.' - - for f in glob.glob('*.mp3'): - os.unlink(f) + rm_mp3() def test_soundcloud_hard_2(self): - for f in glob.glob('*.mp3'): - os.unlink(f) - + rm_mp3() mp3_count = len(glob.glob1('', "*.mp3")) vargs = {'path':'', 'folders': False, 'group': False, 'track': '', 'num_tracks': 1, 'bandcamp': False, 'downloadable': False, 'likes': False, 'open': False, 'artist_url': 'https://soundcloud.com/lostdogz/snuggles-chapstick', 'keep': False} process_soundcloud(vargs) new_mp3_count = len(glob.glob1('', "*.mp3")) self.assertTrue(new_mp3_count > mp3_count) self.assertTrue(new_mp3_count == 1) # This used to be 3, but is now 'Not available in United States.' - - for f in glob.glob('*.mp3'): - os.unlink(f) + rm_mp3() # The test URL for this is no longer a WAV. Need a new testcase. # @@ -88,30 +75,35 @@ def test_soundcloud_hard_2(self): # os.unlink(f) def test_bandcamp(self): - for f in glob.glob('*.mp3'): - os.unlink(f) - + rm_mp3() mp3_count = len(glob.glob1('', "*.mp3")) vargs = {'path':'', 'folders': False, 'group': False, 'track': '', 'num_tracks': 9223372036854775807, 'bandcamp': False, 'downloadable': False, 'likes': False, 'open': False, 'artist_url': 'https://atenrays.bandcamp.com/track/who-u-think'} process_bandcamp(vargs) new_mp3_count = len(glob.glob1('', "*.mp3")) self.assertTrue(new_mp3_count > mp3_count) - - for f in glob.glob('*.mp3'): - os.unlink(f) + rm_mp3() def test_bandcamp_slashes(self): - for f in glob.glob('*.mp3'): - os.unlink(f) - + rm_mp3() mp3_count = len(glob.glob1('', "*.mp3")) vargs = {'path':'', 'folders': False, 'group': False, 'track': '', 'num_tracks': 9223372036854775807, 'bandcamp': False, 'downloadable': False, 'likes': False, 'open': False, 'artist_url': 'https://defill.bandcamp.com/track/amnesia-chamber-harvest-skit'} process_bandcamp(vargs) new_mp3_count = len(glob.glob1('', "*.mp3")) self.assertTrue(new_mp3_count > mp3_count) + rm_mp3() + + def test_bandcamp_html_entities(self): + rm_mp3() + vargs = {'path': '', 'folders': False, 'num_tracks': sys.maxsize, 'open': False, 'artist_url': 'https://anaalnathrakh.bandcamp.com/track/man-at-c-a-bonus-track'} + process_bandcamp(vargs) + mp3s = glob.glob('*.mp3') + self.assertEquals(1, len(mp3s)) + fn = mp3s[0] + self.assertTrue('CandA' in fn) + t = EasyMP3(fn)['title'] + self.assertTrue('C&A' in t[0]) + rm_mp3() - for f in glob.glob('*.mp3'): - os.unlink(f) # def test_musicbed(self): # for f in glob.glob('*.mp3'): @@ -131,11 +123,9 @@ def test_mixcloud(self): MixCloud is being blocked from Travis, interestingly. """ - for f in glob.glob('*.mp3'): - os.unlink(f) - - for f in glob.glob('*.m4a'): - os.unlink(f) + # rm_mp3() + # for f in glob.glob('*.m4a'): + # os.unlink(f) # shortest mix I could find that was still semi tolerable #mp3_count = len(glob.glob1('', "*.mp3")) @@ -146,11 +136,9 @@ def test_mixcloud(self): #new_m4a_count = len(glob.glob1('', "*.m4a")) #self.assertTrue((new_mp3_count > mp3_count) or (new_m4a_count > m4a_count)) - for f in glob.glob('*.mp3'): - os.unlink(f) - - for f in glob.glob('*.m4a'): - os.unlink(f) + # rm_mp3() + # for f in glob.glob('*.m4a'): + # os.unlink(f) # def test_audiomack(self): # for f in glob.glob('*.mp3'): From 5889779a8a1bca96e3722ec509f7cebbadceaad5 Mon Sep 17 00:00:00 2001 From: Jakob Hoeper Date: Thu, 19 Nov 2020 11:55:37 +0100 Subject: [PATCH 12/13] forgot that travis doesn't support python 3.3 --- .travis.yml | 1 - setup.py | 1 - 2 files changed, 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6cbc14b..33db94c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,5 @@ language: python python: - - "3.3" - "3.4" - "3.5" - "3.8" diff --git a/setup.py b/setup.py index cd26b50..cefc64a 100644 --- a/setup.py +++ b/setup.py @@ -48,7 +48,6 @@ 'License :: OSI Approved :: Apache Software License', 'Operating System :: OS Independent', 'Programming Language :: Python', - 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.7', From 800c1bfcad378d2de061e3b7964d59fe8b811862 Mon Sep 17 00:00:00 2001 From: Rich Jones Date: Sun, 22 Nov 2020 10:28:52 +0100 Subject: [PATCH 13/13] 0.31.0 bandcamp fixes --- soundscrape/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soundscrape/__init__.py b/soundscrape/__init__.py index 8ada23a..c3d10d7 100644 --- a/soundscrape/__init__.py +++ b/soundscrape/__init__.py @@ -1 +1 @@ -__version__ = '0.30.2' +__version__ = '0.31.0'