invicnaper / spotify-dl

a script that allows you to download spotify songs or playlists , written in python
322 stars 40 forks source link

Problem on line 63 probably through 65 #7

Open hlejeune opened 7 years ago

hlejeune commented 7 years ago
python3 spotify-dl.py —track 6Qx4oBvRoIrttTcl6UDfk9 --dl youtube
  File "spotify-dl.py", line 63
    print "Videos:\n", "\n".join(videos), "\n"
                    ^
SyntaxError: invalid syntax

So here's the error message trying to download a track with Python 3, before I had an issue recognizing bs4 which still happen on Python 2.7

I tried debugging this one changing commas for concatenation via + and + " " Didn't work. Neither did it change " " to ' ' around \n

hlejeune commented 7 years ago

Hi again,

I solved the error by changing all print statement to have parenthesis so it's compatible Python 3. However urllib2 needs to be changed to 3, and StringIO gives an error as well it need to be from io module not stringIO in Python 3.

I am still not seeing any download even with credentials, I get > printed on the next lines when i launch my command ?

invicnaper commented 7 years ago

You can create a Python3 version ? and send it to me so I can try it out .

hlejeune commented 7 years ago

Hi, I have another question why is playlist not working?

here's my version on a gist: (https://gist.github.com/hlejeune/3fcb083c72faf1be4a40b75f308d0d32)

invicnaper commented 7 years ago

not supported yet, i'll make a major version soon

invicnaper commented 7 years ago

You want to add the python3 version on the README ? so if someone want to use it

hlejeune commented 7 years ago

Sure did you test it. I get http error often with track though i suspect my internet connection

hlejeune commented 7 years ago

Sure did you test it. I get http error often with track though i suspect my internet connection

hlejeune commented 7 years ago

I didn't mean to close the issue. How was your test?

invicnaper commented 7 years ago

You're still using a Python2 version of BS4 on your code

invicnaper commented 7 years ago

You should remove urllib while we're using urllib3. and mention that we should use "2to3 -w bs4" for using bs4 with python3. You can create a pull request adding "how to install it for Python3" in the README.md and the source code

EsmailELBoBDev2 commented 3 years ago

hmm, im using python3.8 and getting same error...