Skip to content

(xiami.py) some songs do not work #137

@Harry1993

Description

@Harry1993

Hello Peter,

Good job in switching to the new Xiami API; we don't need cookies anymore!

I've found some (but not all) songs that can't be pulled. For example:

> xm p 'http://www.xiami.com/song/1769092341'
Traceback (most recent call last):
  File "/home/yman/Dropbox/toolkit/iScript/xiami.py", line 1496, in <module>
    main(argv)
  File "/home/yman/Dropbox/toolkit/iScript/xiami.py", line 1483, in main
    x.url_parser(urls)
  File "/home/yman/Dropbox/toolkit/iScript/xiami.py", line 809, in url_parser
    self.download_song()
  File "/home/yman/Dropbox/toolkit/iScript/xiami.py", line 918, in download_song
    songs = self.get_song(self.song_id)
  File "/home/yman/Dropbox/toolkit/iScript/xiami.py", line 913, in get_song
    song = self._api.song(song_id)
  File "/home/yman/Dropbox/toolkit/iScript/xiami.py", line 396, in song
    info = resp.json()['data']['trackList'][0]
TypeError: 'NoneType' object has no attribute '__getitem__'

Other examples include:

http://www.xiami.com/song/2212862 and http://www.xiami.com/song/1769677735, etc.

Best,

Yanmao

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions