cooperhammond / irs Goto Github PK
View Code? Open in Web Editor NEW:guitar: :notes: A music downloader that understands your metadata needs.
License: MIT License
:guitar: :notes: A music downloader that understands your metadata needs.
License: MIT License
System:
MBP 2015
OSX El Capitan
Python 3.5.1 :: Anaconda 2.5.0 (x86_64)
Trace:
Traceback (most recent call last):
File "/Users/my/stuff/anaconda3/bin/irs", line 11, in <module>
sys.exit(main())
File "/Users/my/stuff/anaconda3/lib/python3.5/site-packages/irs/__main__.py", line 106, in main
manager.rip_spotify_list("album")
File "/Users/my/stuff/anaconda3/lib/python3.5/site-packages/irs/manager.py", line 157, in rip_spotify_list
results = spotify.search(q=search, type=type)
File "/Users/my/stuff/anaconda3/lib/python3.5/site-packages/spotipy/client.py", line 339, in search
return self._get('search', q=q, limit=limit, offset=offset, type=type, market=market)
File "/Users/my/stuff/anaconda3/lib/python3.5/site-packages/spotipy/client.py", line 146, in _get
return self._internal_call('GET', url, payload, kwargs)
File "/Users/my/stuff/anaconda3/lib/python3.5/site-packages/spotipy/client.py", line 108, in _internal_call
r = self._session.request(method, url, headers=headers, proxies=self.proxies, **args)
File "/Users/my/stuff/anaconda3/lib/python3.5/site-packages/requests/sessions.py", line 488, in request
resp = self.send(prep, **send_kwargs)
File "/Users/my/stuff/anaconda3/lib/python3.5/site-packages/requests/sessions.py", line 609, in send
r = adapter.send(request, **kwargs)
File "/Users/my/stuff/anaconda3/lib/python3.5/site-packages/requests/adapters.py", line 423, in send
timeout=timeout
File "/Users/my/stuff/anaconda3/lib/python3.5/site-packages/requests/packages/urllib3/connectionpool.py", line 594, in urlopen
chunked=chunked)
File "/Users/my/stuff/anaconda3/lib/python3.5/site-packages/requests/packages/urllib3/connectionpool.py", line 350, in _make_request
self._validate_conn(conn)
File "/Users/my/stuff/anaconda3/lib/python3.5/site-packages/requests/packages/urllib3/connectionpool.py", line 835, in _validate_conn
conn.connect()
File "/Users/my/stuff/anaconda3/lib/python3.5/site-packages/requests/packages/urllib3/connection.py", line 330, in connect
cert = self.sock.getpeercert()
File "/Users/my/stuff/anaconda3/lib/python3.5/site-packages/requests/packages/urllib3/contrib/pyopenssl.py", line 324, in getpeercert
'subjectAltName': get_subj_alt_name(x509)
File "/Users/my/stuff/anaconda3/lib/python3.5/site-packages/requests/packages/urllib3/contrib/pyopenssl.py", line 171, in get_subj_alt_name
ext = cert.extensions.get_extension_for_class(
AttributeError: 'Extensions' object has no attribute 'get_extension_for_class'
When trying to download a big playlist, it crashes after the line Trying to bypass google captcha.
This line occurs after downloading some tracks.
The error is the following:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/irs/ripper.py", line 229, in find_yt_url
return ("https://youtube.com" + self.code["href"], self.code["title"])
TypeError: 'NoneType' object is not subscriptable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/selenium/webdriver/common/service.py", line 76, in start
stdin=PIPE)
File "/usr/lib/python3.6/subprocess.py", line 709, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.6/subprocess.py", line 1344, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/bin/chromedriver': '/usr/local/bin/chromedriver'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/irs", line 11, in <module>
load_entry_point('irs==6.7.6', 'console_scripts', 'irs')()
File "/usr/lib/python3.6/site-packages/irs/cli.py", line 82, in main
console(ripper)
File "/usr/lib/python3.6/site-packages/irs/utils.py", line 361, in console
ripper.spotify_list("playlist", list_name, username)
File "/usr/lib/python3.6/site-packages/irs/ripper.py", line 356, in spotify_list
locations = self.list(tracks)
File "/usr/lib/python3.6/site-packages/irs/ripper.py", line 369, in list
loc = self.song(track["name"], track["artist"], track)
File "/usr/lib/python3.6/site-packages/irs/ripper.py", line 429, in song
video_url, video_title = self.find_yt_url(song, artist)
File "/usr/lib/python3.6/site-packages/irs/ripper.py", line 226, in find_yt_url
return self.find_yt_url(song, artist, additional_search, caught_by_google, first, tries=tries + 1)
File "/usr/lib/python3.6/site-packages/irs/ripper.py", line 226, in find_yt_url
return self.find_yt_url(song, artist, additional_search, caught_by_google, first, tries=tries + 1)
File "/usr/lib/python3.6/site-packages/irs/ripper.py", line 226, in find_yt_url
return self.find_yt_url(song, artist, additional_search, caught_by_google, first, tries=tries + 1)
[Previous line repeated 1 more times]
File "/usr/lib/python3.6/site-packages/irs/ripper.py", line 224, in find_yt_url
return self.find_yt_url(song, artist, additional_search, caught_by_google, first=True, tries=tries + 1)
File "/usr/lib/python3.6/site-packages/irs/ripper.py", line 234, in find_yt_url
return self.find_yt_url(song=song, artist=artist, additional_search=additional_search, caught_by_google=True, tries=tries + 1)
File "/usr/lib/python3.6/site-packages/irs/ripper.py", line 159, in find_yt_url
soup = BeautifulSoup(CaptchaCheat.cheat_it(link), 'html.parser')
File "/usr/lib/python3.6/site-packages/irs/utils.py", line 469, in cheat_it
with Browser('chrome', **executable_path) as b:
File "/usr/lib/python3.6/site-packages/splinter/browser.py", line 63, in Browser
return driver(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/splinter/driver/webdriver/chrome.py", line 35, in __init__
self.driver = Chrome(chrome_options=options, **kwargs)
File "/usr/lib/python3.6/site-packages/selenium/webdriver/chrome/webdriver.py", line 68, in __init__
self.service.start()
File "/usr/lib/python3.6/site-packages/selenium/webdriver/common/service.py", line 83, in start
os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
Also, executing whereis chromedriver
produces /usr/bin/chromedriver
, and /usr/bin
is in PATH.
Thank you
After looking at the source I saw that the program tries to pick lyric videos, which I understand, because of many reasons, but can you please try to add an experimental switch that tries to instead search using a string like this song + " " + artist + " audio"
which I think may work better in some cases because some lyric videos have poor audio quality (try downloading the F.E.A.R. album by Papa Roach using the app and compare the quality with the original music videos). Maybe in the future I can come up with an algorithm that tries to pick the video with the best quality myself and file a pull request but right now I suggest you try the idea I told you above. And thanks for this cool program.
Hi,
I tried to use your app for the first time using the latest prebuilt binary but when I try to download some song I'm prompted with this error. Should I compile latest IRS to fix this?
Traceback:
michal@Michal-PC:~/Downloads/IRS$ ./irs --artist "Alynda Segarra" --song "Drunken Angel"
[Drunken Angel by Alynda Segarra]
+ Metadata found
Youtube has changed the way it organizes its webpage, submit a bug
on https://github.com/cooperhammond/irs
I think providing user with extra information like views, date, size helps them to have an informed decision.
Tried in both Linux and Windows.
Tried in both python2 and python3
Traceback (most recent call last): File "C:\Users\AB\AppData\Local\Programs\Python\Python37\Scripts\irs-script.py", line 11, in <module> load_entry_point('irs==7.0.2', 'console_scripts', 'irs')() File "c:\users\ab\appdata\local\programs\python\python37\lib\site-packages\irs\cli\cli.py", line 40, in main set_it_up() File "c:\users\ab\appdata\local\programs\python\python37\lib\site-packages\irs\install\setup.py", line 13, in set_it_up bin_path = os.path.join(conf_path, "bin") File "c:\users\ab\appdata\local\programs\python\python37\lib\ntpath.py", line 76, in join path = os.fspath(path) TypeError: expected str, bytes or os.PathLike object, not NoneType
I keep getting following error.
selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
I have downloaded chrome webdriver and installed it in system path as well.
I am using UBUNTU 16.04
Right now irs downloads the video it deems most suitable whenever the user does not specify a specific URL. Sometimes this results in bad videos being selected. Most of the time this happended to me it would have been easy for me to see if the program had output the title/length of the video.
Not sure how feasable this is, but after getting the request and ranking them, it might be a nice idea to output the top X videos (name, length, maybe channel?) and ask the user to pick the one he wants to proceed with.
Probably behind a new flag, as to stay backwards compatible.
Alternatively, if the process should stay noninteractive. It might be a good idea to look at the average length of the top X picks and only select the top one if it is not siginficantly longer/shorter than the rest.
This is more of an enhancement. I searched for a song but it downloaded the same song in a different language. If we keep the name same as the source (youtube/spotify) name, it will help users identify what file they downloaded. Hope I made sense!
Hey is it possible to download only metadata without downloading the song?
hi i am using windows 10 python 3.8.2 Just finnished setting up and im getting the error above saying the .irs config folder isn't there runing "irs -- setup" creates the folders with 2 .exe files in .bin and a config.yml i will attach screenshots of both the error and the .irs folder
Accoding to ff3019e
the code is at version 1.4.0.
The newest release is 1.2.1.
Hello,
Sorry for bugging you with this issue again. I love using 'irs' regularly and wondering how to get it up running again.
So far i have tried reinstalling the whole package with all dependencies but facing the same error as below.
Error message from the terminal:
Indrajits-MacBook-Pro:~ Indrajit$ irs
Traceback (most recent call last):
File "/usr/local/bin/irs", line 7, in
from irs.cli import main
File "/usr/local/lib/python2.7/site-packages/irs/init.py", line 20, in
from .ripper import Ripper
File "/usr/local/lib/python2.7/site-packages/irs/ripper.py", line 21, in
from .utils import YdlUtils, ObjManip, Config
File "/usr/local/lib/python2.7/site-packages/irs/utils.py", line 20, in
import config
File "/usr/local/lib/python2.7/site-packages/irs/config.py", line 11, in
config = open("irs/config_preset", "r").read()
IOError: [Errno 2] No such file or directory: 'irs/config_preset'
Indrajits-MacBook-Pro:~ Indrajit$ irs --setup
"ffmpeg" is already downloaded!
"ffprobe" is already downloaded!
Traceback (most recent call last):
File "/usr/local/bin/irs", line 7, in
from irs.cli import main
File "/usr/local/lib/python2.7/site-packages/irs/init.py", line 13, in
setup()
File "/usr/local/lib/python2.7/site-packages/irs/setup_binaries.py", line 12, in setup
copyfile("irs/config_preset", config_file)
File "/usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 82, in copyfile
with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: 'irs/config_preset'
Is there anything i am missing ? I also tried to check the .irs folder in my $HOME folder and the only folder i find a 'bin' folder but no file named config_preset.
Any help on this Sir ? Thanks a lot..
When running irs -u spotify -p "Coffee Table Jazz"
I receive this error:
Could not find any lists.
But, when running irs -u spotify -p "Peaceful Piano"
, it downloads the songs
Edit: I'm testing on other Spotify
playlists, not all playlists are working even though irs
is authenticated with Spotify.
When I try to install irs, I get error while loading shared libraries: libevent-2.1.so.6
. I realize this is an issue on my OS (popos), but maybe there's some package I should be installing?
I tried searching the ubuntu repos for the file, but no luck.
Hi there,
So i've just installed irs, from within a conda env, followed the instructions and got this error:
tput: unknown terminal "xterm-termite"
To install irs i did as follows:
tput: unknown terminal "xterm-termite"
Traceback (most recent call last):
File "/home/undercover/.conda/envs/irs/bin/irs", line 6, in
from irs.cli import main
File "/home/undercover/.conda/envs/irs/lib/python3.7/site-packages/irs/init.py", line 20, in
from .ripper import Ripper
File "/home/undercover/.conda/envs/irs/lib/python3.7/site-packages/irs/ripper.py", line 21, in
from .utils import YdlUtils, ObjManip, Config, CaptchaCheat
File "/home/undercover/.conda/envs/irs/lib/python3.7/site-packages/irs/utils.py", line 461, in
from splinter import Browser
File "/home/undercover/.conda/envs/irs/lib/python3.7/site-packages/splinter/init.py", line 5, in
from splinter.browser import Browser # NOQA
File "/home/undercover/.conda/envs/irs/lib/python3.7/site-packages/splinter/browser.py", line 9, in
from splinter.driver.webdriver.firefox import WebDriver as FirefoxWebDriver
File "/home/undercover/.conda/envs/irs/lib/python3.7/site-packages/splinter/driver/webdriver/init.py", line 16, in
from six import BytesIO
ModuleNotFoundError: No module named 'six'
Sorry about the formatting, kinda suck at it, and after searching for the error, i found no fix related to irs, and i don't understand what's causing it either. Everything else in my machine works fine, and all the terminal base applications i use run correctly.
Unhandled exception: Missing hash key: "give-url" (KeyError)
from ../../usr/share/crystal/src/hash.cr:1027:11 in '[]'
from docs/irs/src/bottle/cli.cr:95:19 in 'act_on_args'
from docs/irs/src/irs.cr:5:3 in 'main'
from docs/irs/src/irs.cr:8:1 in '__crystal_main'
from ../../usr/share/crystal/src/crystal/main.cr:105:5 in 'main_user_code'
from ../../usr/share/crystal/src/crystal/main.cr:91:7 in 'main'
from ../../usr/share/crystal/src/crystal/main.cr:114:3 in 'main'
from __libc_start_main
from _start
from ???
Ran this irs --album "Demon Days" --artist "Gorillaz"
No error thrown when running irs --song "Bohemian Rhapsody" --artist "Queen"
I want to make some changes in the irs locally, but have no idea how to build system after my changes.
IRS is currently unusable, seems like youtube had internal changes again.
I thought I had put my app tokens in the right file, but any time I try to dl something I get the following error?
Here's one from me trying to find "Moontalk" by Laurel Halo.
Traceback (most recent call last):
File "/Users/caleb/anaconda/bin/irs", line 11, in
load_entry_point('irs==6.7.6', 'console_scripts', 'irs')()
File "/Users/caleb/anaconda/lib/python3.6/site-packages/irs/cli.py", line 82, in main
console(ripper)
File "/Users/caleb/anaconda/lib/python3.6/site-packages/irs/utils.py", line 350, in console
ripper.song(song_name, artist_name)
File "/Users/caleb/anaconda/lib/python3.6/site-packages/irs/ripper.py", line 421, in song
data = self.parse_song_data(song, artist)
File "/Users/caleb/anaconda/lib/python3.6/site-packages/irs/ripper.py", line 382, in parse_song_data
album, track = find_album_and_track(song, artist, self.spotify)
File "/Users/caleb/anaconda/lib/python3.6/site-packages/irs/metadata.py", line 60, in find_album_and_track
tracks = spotify.search(q=song, type="track")["tracks"]["items"]
File "/Users/caleb/anaconda/lib/python3.6/site-packages/spotipy/client.py", line 339, in search
return self._get('search', q=q, limit=limit, offset=offset, type=type, market=market)
File "/Users/caleb/anaconda/lib/python3.6/site-packages/spotipy/client.py", line 146, in _get
return self._internal_call('GET', url, payload, kwargs)
File "/Users/caleb/anaconda/lib/python3.6/site-packages/spotipy/client.py", line 124, in _internal_call
headers=r.headers)
spotipy.client.SpotifyException: http status: 401, code:-1 - https://api.spotify.com/v1/search?q=Moontalk&limit=10&offset=0&type=track:
No token provided
Have I put my tokens into the wrong files?
Is there a way to add a specific YouTube url for download with a Spotify song or album instead of hoping that the selection algorithm gets it right? It works well most of the time, but occasionally, it has downloaded and converted a video of the entire album multiple times over, which is tedious to fix manually.
Lets say you already have some songs on disk, but no metadata for them, it would be great if IRS could have an option in the menu to add the metadata to said music files.
related to #50
Just typed irs
, then 1
and test
What type of media would you like to download?
1) Song
2) Album
3) Playlist
:: 1
Song you would like to download : test
Traceback (most recent call last):
File "/usr/local/bin/irs", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python3.5/dist-packages/irs/__main__.py", line 112, in main
manager.console()
File "/usr/local/lib/python3.5/dist-packages/irs/manager.py", line 47, in console
self.rip_mp3()
File "/usr/local/lib/python3.5/dist-packages/irs/manager.py", line 234, in rip_mp3
audio_code = self.find_mp3(song=song, artist=artist)
File "/usr/local/lib/python3.5/dist-packages/irs/manager.py", line 65, in find_mp3
print (color(song, ["BOLD", "UNDERLINE"]) + ' by ' + color(artist, ["BOLD", "UNDERLINE"]))
File "/usr/local/lib/python3.5/dist-packages/irs/utils.py", line 58, in color
return (bc.ENDC + eval(color_string) + text + bc.ENDC)
TypeError: Can't convert 'NoneType' object to str implicitly
I am encountering an issue since start of this june. I guess spotify needs to refresh tokens or some other stuff for every request made. So far i have found this as an reference to the issue.
Since May 29th 2017, EVERY request needs to be authorized. :(
They announced it in their web...
https://developer.spotify.com/news-stories/2017/01/27/removing-unauthenticated-calls-to-the-web-api/
I really dont have any experience as how to solve this issue. Any one can help me through ?
Below is the error i receive in the terminal :-
Traceback (most recent call last):
File "/usr/local/bin/irs", line 11, in
sys.exit(main())
File "/usr/local/lib/python2.7/site-packages/irs/cli.py", line 75, in main
console(ripper)
File "/usr/local/lib/python2.7/site-packages/irs/utils.py", line 314, in console
ripper.song(song_name, artist_name)
File "/usr/local/lib/python2.7/site-packages/irs/ripper.py", line 348, in song
data = self.parse_song_data(song, artist)
File "/usr/local/lib/python2.7/site-packages/irs/ripper.py", line 309, in parse_song_data
album, track = find_album_and_track(song, artist)
File "/usr/local/lib/python2.7/site-packages/irs/metadata.py", line 60, in find_album_and_track
tracks = spotipy.Spotify().search(q=song, type="track"
File "/usr/local/lib/python2.7/site-packages/spotipy/client.py", line 339, in search
return self._get('search', q=q, limit=limit, offset=offset, type=type, market=market)
File "/usr/local/lib/python2.7/site-packages/spotipy/client.py", line 146, in _get
return self._internal_call('GET', url, payload, kwargs)
File "/usr/local/lib/python2.7/site-packages/spotipy/client.py", line 124, in _internal_call
headers=r.headers)
spotipy.client.SpotifyException: http status: 401, code:-1 - https://api.spotify.com/v1/search?q=s&type=track&limit=10&offset=0:
No token provided
I'm running this via source (i.e. cloning, compiling). I've copied irs to my home directory for convenience, in case that matters. Behaviour is the same running from home or cd'ing into repo/bin/ and running from the binary there.
When I run irs to get a song or an album, it successfully gets to "Downloading video" and then appears to completely hang, like this:
./irs --song "Bohemian Rhapsody" --artist "Queen"
[Bohemian Rhapsody by Queen]
+ Metadata found
+ URL found
Downloading video:
(for an album:)
./irs --album "On Air" --artist "Queen"
+ On Air by Queen
[1/24]
[My Fairy King - BBC Session / February 5th 1973, Langham 1 Studio by Queen]
+ URL found
Downloading video:
I left it for 15 minutes just in case, but it stayed hanging at that point.
Thanks for looking at the authorisation bug. After updating to the newer irs version (6.6.1), there seems to be an error coming up during setup.
Here's the error from the terminal:
irs --setup
"ffmpeg" is already downloaded!
"ffprobe" is already downloaded!
Traceback (most recent call last):
File "/usr/local/bin/irs", line 11, in
load_entry_point('irs==6.6.1', 'console_scripts', 'irs')()
File "/usr/local/lib/python2.7/site-packages/pkg_resources/init.py", line 560, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/local/lib/python2.7/site-packages/pkg_resources/init.py", line 2648, in load_entry_point
return ep.load()
File "/usr/local/lib/python2.7/site-packages/pkg_resources/init.py", line 2302, in load
return self.resolve()
File "/usr/local/lib/python2.7/site-packages/pkg_resources/init.py", line 2308, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "/usr/local/lib/python2.7/site-packages/irs/init.py", line 13, in
setup()
File "/usr/local/lib/python2.7/site-packages/irs/setup_binaries.py", line 12, in setup
copyfile("irs/config_preset", config_file)
File "/usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 82, in copyfile
with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: 'irs/config_preset'
Is there supposed to be a file named config_present in the irs folder which holds the tokens or maybe i am missing something on my installation ?
Thanks for your help.
Feature request:
Can you add an option which can be set in the config file to include or not include (by default) the video_url to the comments/description field. It'd be nice to pass in --video-url option that adds the youtube video URL in the mp3 comments or description field. Doesn't have to be enabled by default but this would be a nice to have so mp3s can be tracked back to youtube source.
I think this is in the ripper.py script. But when it moves the files into the new directory, it uses os.rename which can lead to errors when the files are on different mounts. Try using shutil.move() as it takes the same inputs and can move across mounts.
In the readme it is given as the extension of config file is .yaml
whereas the correct extension is yml
. Please correct it.
And also is there any way I could use it on my Raspberry Pi as it is ARM architecture ? I have installed crystal from this repo.
I am trying to compile it with your repo but it says unsupported shard.lock It was likely generated from a newer version of shards
. My shards version is 0.8.1
Edit : Tried with your 1.0.0 branch and it compiled but if I use it, it says metadata found and after that says There were no results for that query
and says Unhandled exception : There was no URL found on youtube for ...
.
I'd be very happy if you could help me get your program running on the Raspberry Pi 4. Thank you
I ran shards build --release
and got this:
Dependencies are satisfied
Building: irs
Error target irs failed to compile:
Using compiled compiler at /home/g/Public/software/crystal/.build/crystal
Showing last frame. Use --error-trace for full trace.
In src/glue/mapper.cr:4:8
4 | JSON.mapping(
^------
Error: undefined method 'mapping' for JSON:Module
with --error-trace
:
Dependencies are satisfied
Building: irs
Error target irs failed to compile:
Using compiled compiler at /home/g/Public/software/crystal/.build/crystal
In src/irs.cr:1:1
1 | require "./bottle/cli"
^
Error: while requiring "./bottle/cli"
In src/bottle/cli.cr:3:1
3 | require "./config"
^
Error: while requiring "./config"
In src/bottle/config.cr:5:1
5 | require "../search/spotify"
^
Error: while requiring "../search/spotify"
In src/search/spotify.cr:5:1
5 | require "../glue/mapper"
^
Error: while requiring "../glue/mapper"
In src/glue/mapper.cr:4:8
4 | JSON.mapping(
^------
Error: undefined method 'mapping' for JSON:Module
JSON:Module trace:
src/glue/mapper.cr:4
JSON.mapping(
The weird fact is, that on the Crystal's api there is documentation for JSON#mapping()
, so Idk what to do
EDIT: JSON#mapping(_properties_, strict = false)
and JSON#mapping(**_properties_)
are deprecated, you should use JSON::Serializable
I keep getting this error when trying to download a spotify playlist.
irs -u "spotify" -p "Coffee Table Jazz"
Traceback (most recent call last):
File "/usr/bin/irs", line 11, in <module>
load_entry_point('irs==6.3.4', 'console_scripts', 'irs')()
File "/usr/lib/python3.6/site-packages/irs/cli.py", line 59, in main
ripper_args = dict((k, v) for k, v in ripper_args.iteritems() if v)
AttributeError: 'dict' object has no attribute 'iteritems'
Wanted to try this, but isnt working.
╭─artpar at artpar-lenovo in ~/Music using
╰─○ irs -a "Tool" -A "10000 days"
Traceback (most recent call last):
File "/usr/local/bin/irs", line 7, in <module>
from irs.__main__ import main
File "/usr/local/lib/python2.7/dist-packages/irs/__main__.py", line 51
print (bc.HEADER + "Artist of song/album ", end="")
^
SyntaxError: invalid syntax
╭─artpar at artpar-lenovo in ~/Music using
╰─○ irs -a "Tool" -s "Come as you are"
Traceback (most recent call last):
File "/usr/local/bin/irs", line 7, in <module>
from irs.__main__ import main
File "/usr/local/lib/python2.7/dist-packages/irs/__main__.py", line 51
print (bc.HEADER + "Artist of song/album ", end="")
^
SyntaxError: invalid syntax
╭─artpar at artpar-lenovo in ~/Music using
╰─○ python --version
Python 2.7.12
╭─artpar at artpar-lenovo in ~/Music using
╰─○ uname -a
Linux artpar-lenovo 4.4.0-53-generic #74-Ubuntu SMP Fri Dec 2 15:59:10 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
╭─artpar at artpar-lenovo in ~/Music using
╰─○ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.1 LTS
Release: 16.04
Codename: xenial
I think it could be a nice feature to accept an end of file character (e.g. Ctrl + D
) to exit the IRC prompt as an alternative to the exit
option. When you insert it, it shows this error:
Traceback (most recent call last):
File "/usr/bin/irs", line 11, in <module>
load_entry_point('irs==6.3.0', 'console_scripts', 'irs')()
File "/usr/lib/python3.6/site-packages/irs/cli.py", line 59, in main
console(ripper)
File "/usr/lib/python3.6/site-packages/irs/utils.py", line 253, in console
choice = input("{0}irs{1}>{2} ".format(BBLUE, BGRAY, END))
EOFError
Running the install from source instructions exactly on Ubuntu 20.04.1 LTS (WSL 2), I get Error: undefined local variable or method 'future' for Logger
.
This is the full stack trace:
$ shards build
Dependencies are satisfied
Building: irs
Error target irs failed to compile:
In src/glue/mapper.cr:4:8
4 | JSON.mapping(
^------
Warning: Deprecated JSON.mapping. use JSON::Serializable instead (the legacy behaviour is also available in a shard at github:crystal-lang/json_mapping.cr)
In src/glue/mapper.cr:4:3
4 | JSON.mapping(
^
Warning: expanding macro
There was a problem expanding macro 'mapping'
Called macro defined in /usr/share/crystal/src/json/mapping.cr:232:3
232 | macro mapping(**_properties_)
Which expanded to:
> 1 | ::JSON.mapping({tracks: {type: PlaylistTracksMapper, setter: true}, id: String, images: JSON::Any, name: String, owner: JSON::Any, type: String})
2 |
Warning: Deprecated JSON.mapping. use JSON::Serializable instead (the legacy behaviour is also available in a shard at github:crystal-lang/json_mapping.cr)
In src/glue/mapper.cr:18:8
18 | JSON.mapping(
^------
Warning: Deprecated JSON.mapping. use JSON::Serializable instead (the legacy behaviour is also available in a shard at github:crystal-lang/json_mapping.cr)
In src/glue/mapper.cr:28:8
28 | JSON.mapping(
^------
Warning: Deprecated JSON.mapping. use JSON::Serializable instead (the legacy behaviour is also available in a shard at github:crystal-lang/json_mapping.cr)
In src/glue/album.cr:12:7
12 | def find_it
^------
Warning: this method overrides SpotifyList#find_it() which has an explicit return type of JSON::Any.
Please add an explicit return type (JSON::Any or a subtype of it) to this method as well.
The above warning will become an error in a future Crystal version.
In src/glue/playlist.cr:16:7
16 | def find_it
^------
Warning: this method overrides SpotifyList#find_it() which has an explicit return type of JSON::Any.
Please add an explicit return type (JSON::Any or a subtype of it) to this method as well.
The above warning will become an error in a future Crystal version.
A total of 6 warnings were found.
Showing last frame. Use --error-trace for full trace.
In src/interact/logger.cr:41:14
41 | called = future {
^-----
Error: undefined local variable or method 'future' for Logger
This is my crystal version, if it helps
$ crystal --version
Crystal 0.35.1 [5999ae29b] (2020-06-19)
LLVM: 8.0.0
Default target: x86_64-unknown-linux-gnu
$ irs -u "xxxxxxxxxxxx" -p "Proximity"
Traceback (most recent call last):
File "/usr/bin/irs", line 11, in
load_entry_point('irs==6.2.2', 'console_scripts', 'irs')()
File "/usr/lib/python2.7/site-packages/irs-6.2.2-py2.7.egg/irs/cli.py", line 57, in main
ripper.spotify_list("playlist", args.playlist, args.username)
File "/usr/lib/python2.7/site-packages/irs-6.2.2-py2.7.egg/irs/ripper.py", line 234, in spotify_list
locations = self.list(tracks)
File "/usr/lib/python2.7/site-packages/irs-6.2.2-py2.7.egg/irs/ripper.py", line 247, in list
loc = self.song(track["name"], track["artist"], track)
File "/usr/lib/python2.7/site-packages/irs-6.2.2-py2.7.egg/irs/ripper.py", line 300, in song
video_url, video_title = self.find_yt_url(song, artist)
File "/usr/lib/python2.7/site-packages/irs-6.2.2-py2.7.egg/irs/ripper.py", line 112, in find_yt_url
query_string = urlencode({"search_query" : (search_terms)})
File "/usr/lib64/python2.7/urllib.py", line 1326, in urlencode
v = quote_plus(str(v))
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2019' in position 6: ordinal not in range(128)
irs seems to be having a problem with the single apostrophe in the track "It Ain't Me (with Selena Gomez) - Kygo, Selena Gomez"
Need to find a way for irs to not halt on error as well as log to info/stdout that it wasn't able to parse or process track...skip to next track instead of dump to traceback.
Also update application version (6.22 > 6.23) on every commit. I want to make sure I'm working with the correct version.
So the script starts up fine. The spotify token works. I run Python 3.6.6
But when i try to download, i encounter this error:
Album name: currents
Album: "b'Currents'" by "b'Tame Impala'"
Finding Youtube link ...
Downloading "Let It Happen" by "Tame Impala"
Converting to mp3 ...
ERROR: WARNING: unable to obtain file audio codec with ffprobe
Traceback (most recent call last):
File "c:\users\magnus\appdata\local\programs\python\python36\lib\site-packages\youtube_dl\YoutubeDL.py", line 2047, in post_process
files_to_delete, info = pp.run(info)
File "c:\users\magnus\appdata\local\programs\python\python36\lib\site-packages\youtube_dl\postprocessor\ffmpeg.py", line 243, in run
raise PostProcessingError('WARNING: unable to obtain file audio codec with ffprobe')
youtube_dl.utils.PostProcessingError: WARNING: unable to obtain file audio codec with ffprobe
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\magnus\appdata\local\programs\python\python36\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "c:\users\magnus\appdata\local\programs\python\python36\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\Magnus\AppData\Local\Programs\Python\Python36\Scripts\irs.exe_main.py", line 9, in
File "c:\users\magnus\appdata\local\programs\python\python36\lib\site-packages\irs\cli.py", line 82, in main
console(ripper)
File "c:\users\magnus\appdata\local\programs\python\python36\lib\site-packages\irs\utils.py", line 354, in console
ripper.spotify_list("album", album_name)
File "c:\users\magnus\appdata\local\programs\python\python36\lib\site-packages\irs\ripper.py", line 356, in spotify_list
locations = self.list(tracks)
File "c:\users\magnus\appdata\local\programs\python\python36\lib\site-packages\irs\ripper.py", line 369, in list
loc = self.song(track["name"], track["artist"], track)
File "c:\users\magnus\appdata\local\programs\python\python36\lib\site-packages\irs\ripper.py", line 453, in song
ydl.download([video_url])
File "c:\users\magnus\appdata\local\programs\python\python36\lib\site-packages\youtube_dl\YoutubeDL.py", line 2001, in download
url, force_generic_extractor=self.params.get('force_generic_extractor', False))
File "c:\users\magnus\appdata\local\programs\python\python36\lib\site-packages\youtube_dl\YoutubeDL.py", line 803, in extract_info
return self.process_ie_result(ie_result, download, extra_info)
File "c:\users\magnus\appdata\local\programs\python\python36\lib\site-packages\youtube_dl\YoutubeDL.py", line 857, in process_ie_result
return self.process_video_result(ie_result, download=download)
File "c:\users\magnus\appdata\local\programs\python\python36\lib\site-packages\youtube_dl\YoutubeDL.py", line 1635, in process_video_result
self.process_info(new_info)
File "c:\users\magnus\appdata\local\programs\python\python36\lib\site-packages\youtube_dl\YoutubeDL.py", line 1982, in process_info
self.post_process(filename, info_dict)
File "c:\users\magnus\appdata\local\programs\python\python36\lib\site-packages\youtube_dl\YoutubeDL.py", line 2049, in post_process
self.report_error(e.msg)
File "c:\users\magnus\appdata\local\programs\python\python36\lib\site-packages\youtube_dl\YoutubeDL.py", line 620, in report_error
self.trouble(error_message, tb)
File "c:\users\magnus\appdata\local\programs\python\python36\lib\site-packages\youtube_dl\YoutubeDL.py", line 590, in trouble
raise DownloadError(message, exc_info)
youtube_dl.utils.DownloadError: ERROR: WARNING: unable to obtain file audio codec with ffprobe
I have ffprobe installed with pip, so dont see why there would be a error
Add a --verbose option to output more information on the searching, ripping and encoding process of mp3s. It'd be nice to see a --logging option where we could specify log-level such as info, debug. --verbose could also be set to log-level debug while info messages are copied to standard output and to a log file...all configured in the config file of course.
Zorin OS 12 xenial
$ irs
Traceback (most recent call last):
File "/usr/local/bin/irs", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2927, in <module>
@_call_aside
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2913, in _call_aside
f(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2940, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 635, in _build_master
ws.require(__requires__)
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 943, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 829, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'requests' distribution was not found and is required by irs
The captcha cheat is a bit wonky. It'll open the browser with the link in mind, but then it gets the following error. It could be because of Python 3, but I dunno.
Traceback (most recent call last):
File "/Users/Shared/workspace/python/venv3/env/bin/irs", line 11, in <module>
sys.exit(main())
File "/Users/Shared/workspace/python/venv3/env/lib/python3.6/site-packages/irs/cli.py", line 80, in main
ripper.spotify_list("playlist", args.playlist, args.username)
File "/Users/Shared/workspace/python/venv3/env/lib/python3.6/site-packages/irs/ripper.py", line 356, in spotify_list
locations = self.list(tracks)
File "/Users/Shared/workspace/python/venv3/env/lib/python3.6/site-packages/irs/ripper.py", line 369, in list
loc = self.song(track["name"], track["artist"], track)
File "/Users/Shared/workspace/python/venv3/env/lib/python3.6/site-packages/irs/ripper.py", line 429, in song
video_url, video_title = self.find_yt_url(song, artist)
File "/Users/Shared/workspace/python/venv3/env/lib/python3.6/site-packages/irs/ripper.py", line 226, in find_yt_url
return self.find_yt_url(song, artist, additional_search, caught_by_google, first, tries=tries + 1)
File "/Users/Shared/workspace/python/venv3/env/lib/python3.6/site-packages/irs/ripper.py", line 226, in find_yt_url
return self.find_yt_url(song, artist, additional_search, caught_by_google, first, tries=tries + 1)
File "/Users/Shared/workspace/python/venv3/env/lib/python3.6/site-packages/irs/ripper.py", line 226, in find_yt_url
return self.find_yt_url(song, artist, additional_search, caught_by_google, first, tries=tries + 1)
[Previous line repeated 1 more times]
File "/Users/Shared/workspace/python/venv3/env/lib/python3.6/site-packages/irs/ripper.py", line 224, in find_yt_url
return self.find_yt_url(song, artist, additional_search, caught_by_google, first=True, tries=tries + 1)
File "/Users/Shared/workspace/python/venv3/env/lib/python3.6/site-packages/irs/ripper.py", line 234, in find_yt_url
return self.find_yt_url(song=song, artist=artist, additional_search=additional_search, caught_by_google=True, tries=tries + 1)
File "/Users/Shared/workspace/python/venv3/env/lib/python3.6/site-packages/irs/ripper.py", line 159, in find_yt_url
soup = BeautifulSoup(CaptchaCheat.cheat_it(link), 'html.parser')
File "/Users/Shared/workspace/python/venv3/env/lib/python3.6/site-packages/irs/utils.py", line 472, in cheat_it
while CaptchaCheat.strip_it(b.evaluate_script("document.URL")) != CaptchaCheat.strip_it(url):
File "/Users/Shared/workspace/python/venv3/env/lib/python3.6/site-packages/irs/utils.py", line 479, in strip_it
s = s.strip("http://")
TypeError: a bytes-like object is required, not 'str'
artists name: Myon x Fatum feat. Marcus Bently
song name: Rain
python3 /usr/local/bin/irs -a "Myon x Fatum feat. Marcus Bently" -s "Rain"
Finding Youtube Link ...
Finding Youtube Link ...
Downloading "Rain" by "Myon x Fatum feat. Marcus Bently" ...
Converting to mp3 ...
Traceback (most recent call last):
File "/usr/local/bin/irs", line 9, in
load_entry_point('irs==6.2.2', 'console_scripts', 'irs')()
File "/usr/local/lib/python3.5/dist-packages/irs-6.2.2-py3.5.egg/irs/cli.py", line 53, in main
ripper.song(args.song, args.artist)
File "/usr/local/lib/python3.5/dist-packages/irs-6.2.2-py3.5.egg/irs/ripper.py", line 335, in song
m.add_tag( "title", data["name"])
KeyError: 'name'
~/irs$ irs -a "Ashley Wallbridge" -s "Goa (Extended Mix)"
Traceback (most recent call last):
File "/usr/local/bin/irs", line 9, in
load_entry_point('irs==6.2.2', 'console_scripts', 'irs')()
File "/usr/local/lib/python3.5/dist-packages/irs-6.2.2-py3.5.egg/irs/cli.py", line 53, in main
ripper.song(args.song, args.artist)
File "/usr/local/lib/python3.5/dist-packages/irs-6.2.2-py3.5.egg/irs/ripper.py", line 293, in song
song = data["name"]
KeyError: 'name'
irs -u "someuser"
Traceback (most recent call last):
File "/usr/local/bin/irs", line 7, in <module>
from irs.__main__ import main
File "/usr/local/lib/python2.7/site-packages/irs/__main__.py", line 47, in <module>
from .manager import Manager
File "/usr/local/lib/python2.7/site-packages/irs/manager.py", line 78
print (bc.YELLOW + "\nFinding youtube link ...", end="\r")
^
SyntaxError: invalid syntax
$ python --version
Python 2.7.12
$ irs -u "xxxxxxxxxxxxxx" -p "Rap Nation"
Playlist: "Rap Nation" by "xxxxxxxxxxxxx"
Traceback (most recent call last):
File "/usr/bin/irs", line 11, in
load_entry_point('irs==6.2.2', 'console_scripts', 'irs')()
File "/usr/lib/python2.7/site-packages/irs-6.2.2-py2.7.egg/irs/cli.py", line 57, in main
ripper.spotify_list("playlist", args.playlist, args.username)
File "/usr/lib/python2.7/site-packages/irs-6.2.2-py2.7.egg/irs/ripper.py", line 214, in spotify_list
album = self.spotify.album(track["album"]["uri"])
File "/usr/lib/python2.7/site-packages/spotipy/client.py", line 302, in album
trid = self._get_id('album', album_id)
File "/usr/lib/python2.7/site-packages/spotipy/client.py", line 846, in _get_id
fields = id.split(':')
AttributeError: 'NoneType' object has no attribute 'split'
Ubuntu 16.04 python 2.7
ERROR: Signature extraction failed: Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/youtube.py", line 905, in _decrypt_signature
video_id, player_url, s
File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/youtube.py", line 797, in _extract_signature_function
raise ExtractorError('Cannot identify player %r' % player_url)
ExtractorError: Cannot identify player u'/yts/jsbin/player_ias-vflH-Ze7P/en_US/base.js'; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
(caused by ExtractorError(u"Cannot identify player u'/yts/jsbin/player_ias-vflH-Ze7P/en_US/base.js'; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.",)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
File "/usr/local/bin/irs", line 9, in <module>
load_entry_point('irs==6.7.7', 'console_scripts', 'irs')()
File "/usr/local/lib/python2.7/dist-packages/irs/cli.py", line 82, in main
console(ripper)
File "/usr/local/lib/python2.7/dist-packages/irs/utils.py", line 350, in console
ripper.song(song_name, artist_name)
File "/usr/local/lib/python2.7/dist-packages/irs/ripper.py", line 453, in song
ydl.download([video_url])
File "/usr/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py", line 1692, in download
url, force_generic_extractor=self.params.get('force_generic_extractor', False))
File "/usr/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py", line 681, in extract_info
self.report_error(compat_str(e), e.format_traceback())
File "/usr/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py", line 541, in report_error
self.trouble(error_message, tb)
File "/usr/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py", line 511, in trouble
raise DownloadError(message, exc_info)
youtube_dl.utils.DownloadError: ERROR: Signature extraction failed: Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/youtube.py", line 905, in _decrypt_signature
video_id, player_url, s
File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/youtube.py", line 797, in _extract_signature_function
raise ExtractorError('Cannot identify player %r' % player_url)
ExtractorError: Cannot identify player u'/yts/jsbin/player_ias-vflH-Ze7P/en_US/base.js'; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
(caused by ExtractorError(u"Cannot identify player u'/yts/jsbin/player_ias-vflH-Ze7P/en_US/base.js'; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.",)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.