PeterDing/iScript

xiami.py error

Harry1993 opened this issue · 2 comments

Hello Peter,

xiami.py doesn't seem to work with the latest Xiami URL. For example,

> python2 xiami.py p https://www.xiami.com/song/b1pN0v9439cd?spm=a1z1s.6626001.229054121.16.LlI6el
Traceback (most recent call last):
  File "xiami.py", line 1238, in <module>
    main(argv)
  File "xiami.py", line 1225, in main
    x.url_parser(urls)
  File "xiami.py", line 456, in url_parser
    self.download_song()
  File "xiami.py", line 661, in download_song
    songs = self.get_song(self.song_id)
  File "xiami.py", line 657, in get_song
    songs = self.get_songs(album_id, song_id=song_id)
  File "xiami.py", line 562, in get_songs
    t = re.search(r'id="albumCover".+?"(http://.+?)" ', html1).group(1)
AttributeError: 'NoneType' object has no attribute 'group'
>

I am running Python 2.7.12+ on Ubuntu 16.10. It will be appreciated if you could fix it.

Best,
Yanmao

Fixed. try it again.

It works! Thank you.