helpstertee / spotify-playlists-2-deezer Goto Github PK
View Code? Open in Web Editor NEWUpload your Spotify Playlists to Deezer with this Python3 application.
License: MIT License
Upload your Spotify Playlists to Deezer with this Python3 application.
License: MIT License
The other script mentioned here which is used to fetch playlist details from spotify has been updated and now the json file structure is different and hence this script doesnt work with the outputted json file
If a playlist contains the same song twice, the answer from the Deezer API will be "This song already exists in this playlist".
An easy fix is to add
tracklist = list(dict.fromkeys(tracklist))
on line 266 of spotify-restore.py
.
I get the following output after the script runs for about 15 mins:
Traceback (most recent call last):
File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1317, in do_open
encode_chunked=req.has_header('Transfer-encoding'))
File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1229, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1275, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1224, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1016, in _send_output
self.send(msg)
File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 956, in send
self.connect()
File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1384, in connect
super().connect()
File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 928, in connect
(self.host,self.port), self.timeout, self.source_address)
File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socket.py", line 727, in create_connection
raise err
File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socket.py", line 716, in create_connection
sock.connect(sa)
TimeoutError: [Errno 60] Operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "spotify-restore.py", line 353, in <module>
start_import()
File "spotify-restore.py", line 312, in start_import
id_ = add_playlist(li['name'])
File "spotify-restore.py", line 209, in add_playlist
f = urllib.request.urlopen(url, data=params)
File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 525, in open
response = self._open(req, data)
File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 543, in _open
'_open', req)
File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 503, in _call_chain
result = func(*args)
File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1360, in https_open
context=self._context, check_hostname=self._check_hostname)
File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1319, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 60] Operation timed out>
- Unavailable track Yea!! [USUYG1227510]
- Unavailable track Plastic [QMJMT1801953]
- Unavailable track Order [USUM71816897]
Traceback (most recent call last):
File "spotify-restore.py", line 353, in <module>
start_import()
File "spotify-restore.py", line 300, in start_import
if 'isrc' not in trk['track']['external_ids']:
TypeError: 'NoneType' object is not subscriptable
Above is the error I got upon first running script on a new deezer account. Below error happens every subsequent run.
+ Found track Yea!!
+ Found track Plastic
+ Found track Order
Traceback (most recent call last):
File "spotify-restore.py", line 353, in <module>
start_import()
File "spotify-restore.py", line 300, in start_import
if 'isrc' not in trk['track']['external_ids']:
TypeError: 'NoneType' object is not subscriptable
I've noticed when trying to run this after updating my spotify that it doesn't add tracks to the playlists that already exist on deezer. Is there any way you can implement this? Or if it's easier, an option to delete all playlists from deezer to allow the updated playlists to transfer properly?
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.