0

JSON from urllib returns uncomplete links

I have this script that returns information about a pypi module from urllib.request import * import json JSON = json.loads(urlopen("https://pypi.org/pypi/d2/json").read()) print(JSON["releases"]["0.2"]) But it returns [{'comment_text': '', 'digests': {'md5': 'adc9d83b74a208948679ca40eccf1f84', 'sha256': 'ca828712d44313e17d704fa0be6ec02e6c38213d77ffeca5b9faf3be93b96e1e'}, 'downloads': -1, 'filename': 'd2-0.2-py3-none-any.whl', 'has_sig': False, 'md5_digest': 'adc9d83b74a208948679ca40eccf1f84', 'packagetype': 'bdist_wheel', 'python_version': 'py3', 'requires_python': None, 'size': 2388, 'upload_time': '2019-04-25T05:47:39', 'url': 'https:/..\Playground\-0.2-py3-none-any.whl'}] But it should return what this returns https://repl.it/@Hampusm/Test

8th May 2019, 11:59 AM
Hampus Mathiesen
Hampus Mathiesen - avatar
2 Answers
+ 1
The URL link is incomplete because of how Code Playground handles them. If you try it in a different IDE you'll get the complete URL.
8th May 2019, 2:02 PM
Diego
Diego - avatar
0
Diego I know but is it possible to make SoloLearn display the full url?
8th May 2019, 2:24 PM
Hampus Mathiesen
Hampus Mathiesen - avatar