Giter VIP home page Giter VIP logo

soundscrape's People

Contributors

alexey1100 avatar atr0s avatar brachna avatar gleitz avatar huntrar avatar jkatzwinkel avatar masterfocus avatar stewpoll avatar svenluijten avatar z-z-z-z avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

soundscrape's Issues

UnicodeEncodeError: 'ascii' codec can't encode character u'\u266b' in position 55: ordinal not in range(128)

It happend to me while i was trying to download this set:
https://soundcloud.com/angrysausage/sets/undertale-toby-fox

First 5 songs went through without any problems but then on the 6th song it crashed.
Its probably due to the 6th song's name having ♫ sing at the end of title:
Toby Fox - UNDERTALE Soundtrack - 06 Uwa!! So Temperate♫

Here is the whole error:

Traceback (most recent call last):
File "c:\python27\lib\runpy.py", line 162, in run_module_as_main
"main", fname, loader, pkg_name)
File "c:\python27\lib\runpy.py", line 72, in run_code
exec code in run_globals
File "C:\Python27\Scripts\soundscrape.exe__main
.py", line 9, in
File "c:\python27\lib\site-packages\soundscrape\soundscrape.py", line 74, in main
process_soundcloud(vargs)
File "c:\python27\lib\site-packages\soundscrape\soundscrape.py", line 133, in process_soundcloud
filenames = download_tracks(client, tracks, num_tracks, vargs['downloadable'], vargs['folders'], id3_extras=id3_extras)
File "c:\python27\lib\site-packages\soundscrape\soundscrape.py", line 226, in download_tracks
puts(colored.red("Problem downloading ") + track['title'])
File "c:\python27\lib\site-packages\clint\textui\colored.py", line 105, in add
return str(self.color_str) + str(other)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u266b' in position 55: ordinal not in range(128)

I was trying to fix it myself but im horibble at python :/

Please help and thank you in advance :-)

[Suggestions] Avoid redownloads even without "-f" and add "-r" to allow redownloads

I intend to implement these suggestions in the future, but I'm opening this "issue" to serve as a reminder and also to gather opinions about them.

First suggestion

In commit ee3f12a, I've set the Bandcamp scraper to never redownload songs, even if the "-f" flag is not specified. Simply put, I think this should be the default behaviour and should be replicated to all other scrapers. The specific code can currently be found between lines 294 and 311: https://github.com/Miserlou/SoundScrape/blob/master/soundscrape/soundscrape.py#L294-L311

Second suggestion

As I've also noted in commit ee3f12a, implementing the first suggestion could raise the idea of adding a "-r" flag, so the user may actually allow redownloads.

Allow skipping a song

A common case I ran across was wanting to skip a large song (perhaps a live set or something) when downloading a whole artist. Shouldn't be too hard to accept some keyboard input I think.

Would you accept a PR for this?

SSL Error

Suddenly started getting these:

[Errno 1] _ssl.c:510: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure

Not sure why yet. Maybe SC changed the album art location?

SoundScrape doesn't gracefully handle 'Preview' tracks

Hello,

Firstly, this is a fantastic thing you have created here, a real time saver, keep up the excellent work!

So here is the problem I have ran into, and I have been using soundscrape for about 6 months or so now and have not encountered this before, though I am not familiar with python so perhaps it is an error in my understanding.
When I try downloading Future's tracklist (https://soundcloud.com/futureisnow/tracks) with the command:
soundscrape futureisnow
Nothing happens and the console moves on to the next line to await the next command (indicating it believes it completed the previous command). Now I noticed that a larger amount of the tracks are "Previews", however not all of them, and the tracks I am looking for specifically are NOT previews. In fact, they are in a set: https://soundcloud.com/futureisnow/sets/purple-reign. So I tried to do a set download:
soundscrape https://soundcloud.com/futureisnow/sets/purple-reign
Yet still I get the same behavior from the console. Any ideas why this may be, or am I just losing my mind here?

Thanks.

Problem with "/" character on Bandcamp

there may exist some problems with creating correct tracknames with bandcamp

Downloading: Amnesia / Chamber Harvest Skit
Problem downloading Amnesia / Chamber Harvest Skit
[Errno 2] No such file or directory: u'Def Ill - Def Ills Harvest/05 - Amnesia / Chamber Harvest Skit.mp3'

pip install error 'egg_base' option: 'pip-egg-info' does not exist or is not a directory

pip install soundscrape
Downloading/unpacking soundscrape
Downloading soundscrape-0.23.4.tar.gz
Running setup.py (path:/tmp/pip_build_lowend/soundscrape/setup.py) egg_info for package soundscrape
Downloading/unpacking https://bitbucket.org/lazka/mutagen/get/default.tar.gz
Running setup.py (path:/tmp/pip-myuolr-build/setup.py) egg_info for package from https://bitbucket.org/lazka/mutagen/get/default.tar.gz
/usr/local/lib/python2.7/dist-packages/setuptools-19.2-py2.7.egg/setuptools/dist.py:293: UserWarning: The version specified ('1.31.-1') is an invalid version, this may not work as expected with newer versions of setuptools, pip, and PyPI. Please see PEP 440 for more details.

  Requirement already satisfied (use --upgrade to upgrade): mutagen==1.31.-1 from https://bitbucket.org/lazka/mutagen/get/default.tar.gz in /usr/local/lib/python2.7/dist-packages
Cleaning up...
error: error in 'egg_base' option: 'pip-egg-info' does not exist or is not a directory
Complete output from command python setup.py egg_info:
Downloading/unpacking https://bitbucket.org/lazka/mutagen/get/default.tar.gz

Running setup.py (path:/tmp/pip-myuolr-build/setup.py) egg_info for package from https://bitbucket.org/lazka/mutagen/get/default.tar.gz

/usr/local/lib/python2.7/dist-packages/setuptools-19.2-py2.7.egg/setuptools/dist.py:293: UserWarning: The version specified ('1.31.-1') is an invalid version, this may not work as expected with newer versions of setuptools, pip, and PyPI. Please see PEP 440 for more details.

Requirement already satisfied (use --upgrade to upgrade): mutagen==1.31.-1 from https://bitbucket.org/lazka/mutagen/get/default.tar.gz in /usr/local/lib/python2.7/dist-packages

Cleaning up...

running egg_info

error: error in 'egg_base' option: 'pip-egg-info' does not exist or is not a directory


Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_lowend/soundscrape

.....................................................................................................

The fix is simply:

sudo pip install -U pip

and then reinstall SoundScrape using pip!

s/o Miserlou I <3 SoundScrape!

invalid mode ('wb') or filename

Got this error and it's caused by using : on file names on Windows. The didn't music have this char on it's name. Got the error when trying to download it alone and when trying to download the full album.

captura de tela 2015-08-18 05 47 41

UnicodeEncodeError

Whenever I try to download a song containing a character from a foreign langauge, the program throws the following error.

UnicodeEncodeError: 'charmap' codec can't encode characters in position 0-3: character maps to

HttpError from requests

Thanks for writing this, great idea!

Currently having issues, using Python 2 on Arch Linux. Installed via Python 2 pip (pip2 in Arch usually) and ensured I have appropriate version of requests.

But I get 404s for some reason when trying to download this mix.

$ soundscrape dazedandconfused -t "Zola Jesus - T U N D R A"
Traceback (most recent call last):
  File "/usr/bin/soundscrape", line 9, in <module>
    load_entry_point('soundscrape==0.10.0', 'console_scripts', 'soundscrape')()
  File "/usr/lib/python2.7/site-packages/soundscrape/soundscrape.py", line 50, in main
    resolved = client.get('/resolve', url=artist_url)
  File "/usr/lib/python2.7/site-packages/soundcloud/client.py", line 130, in _request
    return wrapped_resource(make_request(method, url, kwargs))
  File "/usr/lib/python2.7/site-packages/soundcloud/request.py", line 134, in make_request
    result.raise_for_status()
  File "/usr/lib/python2.7/site-packages/requests/models.py", line 765, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found

$ soundscrape https://soundcloud.com/dazedandconfused/zola-jesus-t-u-n-d-r-a
Downloading: Zola Jesus – T U N D R A
Problem downloading Zola Jesus – T U N D R A
404 Client Error: Not Found

Please let me know if I can provide more information for you.

No Module named mutagen.mp3

So I just installed SoundScrape and I can't manage to make it work.

Stewarts-iMac:Music Stewart$ soundscrape https://soundcloud.com/ccpgames/sets/eve-online-in-game-tracks Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/bin/soundscrape", line 7, in <module> from soundscrape.soundscrape import main File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/soundscrape/soundscrape.py", line 13, in <module> from mutagen.mp3 import MP3, EasyMP3 ImportError: No module named mutagen.mp3

--open does not work with bandcamp artists with multiple albums

soundscrape -of https://mrcarmack.bandcamp.com/

Downloading: Strolling
[################################] 4505/4505 - 00:01:10

Traceback (most recent call last):
File "/usr/local/bin/soundscrape", line 11, in
sys.exit(main())
File "/usr/local/lib/python2.7/site-packages/soundscrape/soundscrape.py", line 67, in main
process_bandcamp(vargs)
File "/usr/local/lib/python2.7/site-packages/soundscrape/soundscrape.py", line 247, in process_bandcamp
open_files(filenames)
File "/usr/local/lib/python2.7/site-packages/soundscrape/soundscrape.py", line 621, in open_files
process = Popen(command, stdout=PIPE, stderr=PIPE)
File "/usr/local/Cellar/python/2.7.10_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in init
errread, errwrite)
File "/usr/local/Cellar/python/2.7.10_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
TypeError: execv() arg 2 must contain only strings

Track unavailable for scraping

I tried downloading all music from approachingnirvana from bandcamp but at a certain it gives "Track unavailable for scraping" for every track.

"Trackback ..." message -- no downloads?

I installed soundscrape, but trying to use it this is the response I get:

➜ ~ sudo pip install soundscrape
The directory '/Users/user/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/user/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting soundscrape
/Library/Python/2.7/site-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Downloading soundscrape-0.16.1.tar.gz
Collecting args>=0.1.0 (from soundscrape)
Downloading args-0.1.0.tar.gz
Collecting clint>=0.3.2 (from soundscrape)
Downloading clint-0.5.1.tar.gz
Collecting demjson==2.2.2 (from soundscrape)
Downloading demjson-2.2.2.tar.gz (130kB)
100% |████████████████████████████████| 131kB 629kB/s
Collecting fudge==1.0.3 (from soundscrape)
Downloading fudge-1.0.3.tar.gz (87kB)
100% |████████████████████████████████| 90kB 992kB/s
Collecting mutagen==1.22 (from soundscrape)
Downloading mutagen-1.22.tar.gz (813kB)
100% |████████████████████████████████| 815kB 406kB/s
Collecting requests>=2.1.0 (from soundscrape)
Downloading requests-2.8.0-py2.py3-none-any.whl (476kB)
100% |████████████████████████████████| 479kB 490kB/s
Collecting simplejson==3.3.1 (from soundscrape)
Downloading simplejson-3.3.1.tar.gz (67kB)
100% |████████████████████████████████| 69kB 1.1MB/s
Collecting soundcloud>=0.4.1 (from soundscrape)
Downloading soundcloud-0.4.1.tar.gz
Requirement already satisfied (use --upgrade to upgrade): wsgiref==0.1.2 in /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 (from soundscrape)
Installing collected packages: args, clint, demjson, fudge, mutagen, requests, simplejson, soundcloud, soundscrape
Running setup.py install for args
Running setup.py install for clint
Running setup.py install for demjson
Running setup.py install for fudge
Running setup.py install for mutagen
Running setup.py install for simplejson
Running setup.py install for soundcloud
Running setup.py install for soundscrape
Successfully installed args-0.1.0 clint-0.5.1 demjson-2.2.2 fudge-1.0.3 mutagen-1.22 requests-2.8.0 simplejson-3.3.1 soundcloud-0.4.1 soundscrape-0.16.1
➜ ~ soundscrape https://soundcloud.com/mrsuicidesheep/sven-van-hees-soda-pressing
Traceback (most recent call last):
File "/usr/local/bin/soundscrape", line 5, in
from pkg_resources import load_entry_point
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2603, in
working_set.require(requires)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 666, in require
needed = self.resolve(parse_requirements(requirements))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve
raise DistributionNotFound(req) # XXX put more info here
pkg_resources.DistributionNotFound: requests>=2.1.0
➜ ~ soundscrape
Traceback (most recent call last):
File "/usr/local/bin/soundscrape", line 5, in
from pkg_resources import load_entry_point
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2603, in
working_set.require(requires)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 666, in require
needed = self.resolve(parse_requirements(requirements))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve
raise DistributionNotFound(req) # XXX put more info here
pkg_resources.DistributionNotFound: requests>=2.1.0
➜ ~ sudo soundscrape https://soundcloud.com/mrsuicidesheep/sven-van-hees-soda-pressing
Traceback (most recent call last):
File "/usr/local/bin/soundscrape", line 5, in
from pkg_resources import load_entry_point
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2603, in
working_set.require(requires)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 666, in require
needed = self.resolve(parse_requirements(requirements))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve
raise DistributionNotFound(req) # XXX put more info here
pkg_resources.DistributionNotFound: requests>=2.1.0
➜ ~
Last login: Thu Oct 8 09:32:35 on ttys000
➜ ~ soundscrape
Traceback (most recent call last):
File "/usr/local/bin/soundscrape", line 5, in
from pkg_resources import load_entry_point
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2603, in
working_set.require(requires)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 666, in require
needed = self.resolve(parse_requirements(requirements))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve
raise DistributionNotFound(req) # XXX put more info here
pkg_resources.DistributionNotFound: requests>=2.1.0
➜ ~ soundscrape https://soundcloud.com/mrsuicidesheep/sven-van-hees-soda-pressing
Traceback (most recent call last):
File "/usr/local/bin/soundscrape", line 5, in
from pkg_resources import load_entry_point
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2603, in
working_set.require(requires)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 666, in require
needed = self.resolve(parse_requirements(requirements))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve
raise DistributionNotFound(req) # XXX put more info here
pkg_resources.DistributionNotFound: requests>=2.1.0
➜ ~

Where are the files supposed to be saved to? What do the above messages mean? Thanks.

UnicodeEncodeError

soundscrape https://urbnet.bandcamp.com/album/spirit-of-the-golden-era
Traceback (most recent call last):
File "/usr/local/bin/soundscrape", line 9, in
load_entry_point('soundscrape==0.22.1', 'console_scripts', 'soundscrape')()
File "/usr/local/lib/python2.7/site-packages/soundscrape/soundscrape.py", line 67, in main
process_bandcamp(vargs)
File "/usr/local/lib/python2.7/site-packages/soundscrape/soundscrape.py", line 246, in process_bandcamp
filenames = scrape_bandcamp_url(bc_url, num_tracks=vargs['num_tracks'], folders=vargs['folders'])
File "/usr/local/lib/python2.7/site-packages/soundscrape/soundscrape.py", line 272, in scrape_bandcamp_url
album_data = get_bandcamp_metadata(url)
File "/usr/local/lib/python2.7/site-packages/soundscrape/soundscrape.py", line 377, in get_bandcamp_metadata
output['genre'] = ' '.join(str(s) for s in tags)
File "/usr/local/lib/python2.7/site-packages/soundscrape/soundscrape.py", line 377, in
output['genre'] = ' '.join(str(s) for s in tags)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u202c' in position 20: ordinal not in range(128)

id3tag-coverart | not original size (substantially smaller)

I primarily liked youtube-dl for it's parameters, but SoundScrape seems to do a fantastic job with handling SoundCloud's horrendous errors that I can't even recall the last time I didn't have one when playing any track.

By default SoundScrape works the best. With options like:
auto-tag (depending how the track is titled on-page)
embedcoverart

+1 for not having to also download the image file but instead embeds it during the downloading process. So all you have is just the track.
+1 for having it work with e-mail notification links as well.

Everybody is happy now, except....

PROBLEM

The coverart that's embeded to the downloaded track isn't the same size as the original trackart.

NOTE

again, SoundScrape doesn't offer any parameters and works best by default so isn't there a way to control this?

soundscrape stops downloading after making its way partially through likes

Hi There @Miserlou,

First of all, this is a lifesaver, thank you so much!

Currently running into an issue where soundscrape starts iterating through and downloading all of my liked songs on soundcloud (username is ewish), but the process stops after 50 downloads. I ran the following commands each time, and they each resulted in soundscrape stopping after 50 downloads.

$ soundscrape ewish -l
$ soundscrape ewish -l -f
$ soundscrape https://soundcloud.com/ewish/likes
$ soundscrape https://soundcloud.com/ewish/likes -f

The 51st song works fine when being downloaded as a track, i.e.
$ soundscrape https://soundcloud.com/ob-obrien/ob-obrien-schemin-up

Just for clarity, wondering if there a limit imposed? Any way to get around this?

Thanks!

Invalid environment marker: python_version >"3.0"

I'm on a fresh Ubuntu install and receiving the following error:

justin@megatron:~$ pip install soundscrape
Collecting soundscrape
Using cached soundscrape-0.23.5.tar.gz
Complete output from command python setup.py egg_info:
Collecting https://bitbucket.org/lazka/mutagen/get/default.tar.gz
Using cached https://bitbucket.org/lazka/mutagen/get/default.tar.gz
Requirement already satisfied (use --upgrade to upgrade): mutagen===1.31.-1 from https://bitbucket.org/lazka/mutagen/get/default.tar.gz in /usr/local/lib/python2.7/dist-packages
warning: pypandoc module not found, could not convert Markdown to RST
error in soundscrape setup command: Invalid environment marker: python_version < "3.0"

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-b8Pvnk/soundscrape

I was able to get past this same error on my Mac OSX box by installing another python instance using brew. Surely I'm doing something wrong here... but I can't figure it out.

Downloading list of likes stops at 170 tracks

when I run:

$ soundscrape sharmanhall -l

stops at 170 songs. last track it downloaded:

Downloading: SAFIA - You Are The One
[################################] 3534/3534 - 00:00:04

UnboundLocalError: local variable 'tracks' referenced before assignment

Getting this error on most artists/sets

Traceback (most recent call last):
File "/usr/local/bin/soundscrape", line 9, in
load_entry_point('soundscrape==0.4.0', 'console_scripts', 'soundscrape')()
File "/usr/local/lib/python2.7/dist-packages/soundscrape/soundscrape.py", line 42, in main
download_tracks(client, tracks, num_tracks)
UnboundLocalError: local variable 'tracks' referenced before assignment

i was able to grab this set without a problem: https://soundcloud.com/b3at_playlists_official/sets/chill

pkg_resources.DistributionNotFound: wheel==0.24.0

Similar to @dslackw in #9, I'm having issues with a pip installation of a dependency.

I've tried using the --no-cache-dir option and a few other tips in this SO post, to no avail.

Something seems whacky with the way pip is associating the dependencies.

Full traceback:

[soundscrape_test]$ soundscrape stolensnares
Traceback (most recent call last):
  File "/usr/local/bin/soundscrape", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/Library/Python/2.7/site-packages/distribute-0.6.14-py2.7.egg/pkg_resources.py", line 2671, in <module>
    working_set.require(__requires__)
  File "/Library/Python/2.7/site-packages/distribute-0.6.14-py2.7.egg/pkg_resources.py", line 654, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/Library/Python/2.7/site-packages/distribute-0.6.14-py2.7.egg/pkg_resources.py", line 552, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: wheel==0.24.0

403 Client Error: Forbidden for url

$ sof https://soundcloud.com/ministryofsoundaus/dirtcaps-x-tom-piper-rudeboi-1
Traceback (most recent call last):
File "/usr/local/bin/soundscrape", line 11, in
sys.exit(main())
File "/usr/local/lib/python2.7/site-packages/soundscrape/soundscrape.py", line 74, in main
process_soundcloud(vargs)
File "/usr/local/lib/python2.7/site-packages/soundscrape/soundscrape.py", line 105, in process_soundcloud
resolved = client.get('/resolve', url=artist_url, limit=200)
File "/usr/local/lib/python2.7/site-packages/soundcloud/client.py", line 133, in _request
return wrapped_resource(make_request(method, url, kwargs))
File "/usr/local/lib/python2.7/site-packages/soundcloud/request.py", line 148, in make_request
result.raise_for_status()
File "/usr/local/lib/python2.7/site-packages/requests/models.py", line 840, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://api.soundcloud.com/tracks/221944626?client_id=22e566527758690e6feb2b5cb300cc43

Embed Album Art

I don't know how to do this yet, but apparently you can embed image files in MP3s for the ID3 tag. It'd be cool if SC supported this.

Download all Likes

Doesn't work for downloading all of a user's "Likes"

$ soundscrape https://soundcloud.com/troyboi/likes
Traceback (most recent call last):
File "/usr/local/bin/soundscrape", line 9, in
load_entry_point('soundscrape==0.10.2', 'console_scripts', 'soundscrape')()
File "/usr/local/lib/python2.7/site-packages/soundscrape/soundscrape.py", line 52, in main
if resolved.kind == 'artist':
AttributeError: 'ResourceList' object has no attribute 'kind'

UnicodeDecodeError

Works fine! Thank u for this one.
But I got an error. In my case mix has an apostrophe in title. And I suppose that's the reason it falls to error.

[cv@emy sets]$ soundscrape https://www.mixcloud.com/paulvandyk/paul-van-dyks-vonyc-sessions-477-allen-envy/
Traceback (most recent call last):
  File "/usr/bin/soundscrape", line 9, in <module>
    load_entry_point('soundscrape==0.18.1', 'console_scripts', 'soundscrape')()
  File "/usr/lib/python2.7/site-packages/soundscrape/soundscrape.py", line 63, in main
    process_mixcloud(vargs)
  File "/usr/lib/python2.7/site-packages/soundscrape/soundscrape.py", line 333, in process_mixcloud
    filenames = scrape_mixcloud_url(mc_url, num_tracks=vargs['num_tracks'], folders=vargs['folders'])
  File "/usr/lib/python2.7/site-packages/soundscrape/soundscrape.py", line 367, in scrape_mixcloud_url
    puts(colored.green(u"Downloading") + ': ' + data['artist'].encode('utf-8') + " - " + data['title'].encode('utf-8') + " (" + track_filename[-4:] + ")")
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 60: ordinal not in range(128)

[bug] SoundScrape is broken for BandCamp URLs

Looks like they updated the JS, need to update SC:

soundscrape https://lowestate.bandcamp.com/album/blood-horizon
Downloading: A Steady Decline
Problem downloading A Steady Decline
Invalid URL '//popplers5.bandcamp.com/download/track?enc=mp3-128&fsig=e444965fa15cea3b59199bf0dd7fc105&id=1442362344&stream=1&ts=1443828187.0': No schema supplied. Perhaps you meant http:////popplers5.bandcamp.com/download/track?enc=mp3-128&fsig=e444965fa15cea3b59199bf0dd7fc105&id=1442362344&stream=1&ts=1443828187.0?

Porting to python3

Thoughts?

I got soundscrape to launch under Python 3 on this fork after making some syntax changes, but it will not download files so I think there are some more changes that need to be made to port it to Python 3. I don't know how long it would take to port.

One reason to port is that people are running into install issues under python3, and having dependency troubles: #5 Moving to python3 would fix these issues and reduce further issues as more and more people move to python3.

If you choose to remain on 2.7 then maybe make a note of that in the readme that it requires 2.7 and how to setup 2.7?

Also, if you don't port to python3 then this change is needed to allow for mutagen 1.29 or greater to fix several install issues I've run into: #27

Failed to install soundscrape

Hi I'm trying to work on your project, but I'm new to python and open source software. I'm getting this error when calling the command install soundscrape. Is this a problem with my version of pip?

the temp folder that was made to install also showed this error.
File "c:\users\michael\appdata\local\temp\pip_build_michael\mutagen\setup.py", line 37

except EnvironmentError, err:

Thanks

pkg_resources.UnknownExtra: requests 2.3.0 has no such extra feature 'security'

I installed it using pip. I am running Windows 8.1 64-bit using python 2.7.7 (via Anaconda). Traceback below:

Z:\Musik\MOON>soundscrape.exe moon_music
Traceback (most recent call last):
File "C:\Anaconda\Scripts\soundscrape-script.py", line 5, in
from pkg_resources import load_entry_point
File "C:\Anaconda\lib\site-packages\setuptools-3.6-py2.7.egg\pkg_resources.py"
, line 2829, in
File "C:\Anaconda\lib\site-packages\setuptools-3.6-py2.7.egg\pkg_resources.py"
, line 449, in _build_master
File "C:\Anaconda\lib\site-packages\setuptools-3.6-py2.7.egg\pkg_resources.py"
, line 742, in require
File "C:\Anaconda\lib\site-packages\setuptools-3.6-py2.7.egg\pkg_resources.py"
, line 644, in resolve
File "C:\Anaconda\lib\site-packages\setuptools-3.6-py2.7.egg\pkg_resources.py"
, line 2367, in requires
pkg_resources.UnknownExtra: requests 2.3.0 has no such extra feature 'security'

Ideas?

group the downloaded files

This works well, and here's a feature request. Or two.

  • For each user, there could be a folder created & all the sounds put into them.
  • When a folder already exists, the sounds already downloaded could be skipped & only the rest could be fetched again.

Thank you!

--no-rip option

Some snobs people only want 320s. SoundScrape needs an option to skip rips and only download from links.

Won't download specific bandcamp albums

Attempting to download all albums from http://salted.bandcamp.com/

Even when I run soundscrape -b http://salted.bandcamp.com/music it does not work.
Error is as follows:

C:\WINDOWS\system32>soundscrape -b http://salted.bandcamp.com/music

Downloading: Out Of Hand
[################################] 1433/1433 - 00:00:09
Traceback (most recent call last):
File "C:\Python27\Scripts\soundscrape-script.py", line 9, in <module> load_entry_point('soundscrape==0.22.1', 'console_scripts', 'soundscrape')()
File "c:\python27\lib\site-packages\soundscrape\soundscrape.py", line 67, in main process_bandcamp(vargs)
File "c:\python27\lib\site-packages\soundscrape\soundscrape.py", line 246, in process_bandcamp filenames = scrape_bandcamp_url(bc_url, num_tracks=vargs['num_tracks'], fold ers=vargs['folders'])
File "c:\python27\lib\site-packages\soundscrape\soundscrape.py", line 278, in scrape_bandcamp_url filenames.append(scrape_bandcamp_url(album_url, num_tracks, folders))
File "c:\python27\lib\site-packages\soundscrape\soundscrape.py", line 272, in scrape_bandcamp_url album_data = get_bandcamp_metadata(url) File "c:\python27\lib\site-packages\soundscrape\soundscrape.py", line 377, in get_bandcamp_metadata output['genre'] = ' '.join(str(s) for s in tags)
File "c:\python27\lib\site-packages\soundscrape\soundscrape.py", line 377, in <genexpr> output['genre'] = ' '.join(str(s) for s in tags)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 2: ordinal not in range(128)

[feature] Mixcloud support ?

Wondering if current SoundScrape support Mixcloud ?
and if not..is there a plan to add it like the bandcamp option ?

ImportError: No module named mutagen.mp3

I installed soundscrape using pip on Windows 10 x64. The mutagen dependency does not seem to be property installed:

$ soundscrape.exe https://soundcloud.com/xxxx
Traceback (most recent call last):
  File "c:\python27\lib\runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "c:\python27\lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "C:\Python27\Scripts\soundscrape.exe\__main__.py", line 5, in <module>
  File "c:\python27\lib\site-packages\soundscrape\soundscrape.py", line 13, in <module>
    from mutagen.mp3 import MP3, EasyMP3
ImportError: No module named mutagen.mp3

I manually downloaded, built, and installed mutagen. Now soundscrape works perfectly.

[Suggestion] Corrected tags for remixed or reposted tracks

I listen to a lot of EDM music where a lot of the tracks are remixed by other artists. When these tracks are posted on Soundcloud, they're usually posted by the remixer, with the original artist & track title put in the title.

Here's an example: https://soundcloud.com/samfeldt/years-years-shine-sam-feldt-remix-1

The result is a track tagged like such:

Artist: Sam Feldt
Track: Years & Years - Shine (Sam Feldt Remix)

A flag which would automatically correct this tagging would be awesome. The process should be static for most cases, scrape the original artist (before the - in the title), place that as the Artist and remove it from the title.

Result:

Artist: Years & Years
Track: Shine (Sam Feldt Remix)

Mixcloud functionality not working

Upon trying to download any mixcloud link, soundscrape downloads a file with correct file name and extension, but only 1kb size.
eg:

Downloading: Resident Advisor - RA.398 AnD (.m4a)
[################################] 1/1 - 00:00:00

Downloaded most recent number of tracks?

Is it possible to download a number of liked tracks of an artist, but the most recent ones only?
E.g., I don't want to download the whole huge list of liked tracks, but only the 10 recent ones.
soundscrape https://soundcloud/<artist>/likes -n 10 will download 10 oldest liked tracks, but I don't see an option for recent ones.
Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.