PeterDing / iScript

各种脚本 -- 关于 虾米 xiami.com, 百度网盘 pan.baidu.com, 115网盘 115.com, 网易音乐 music.163.com, 百度音乐 music.baidu.com, 360网盘/云盘 yunpan.cn, 视频解析 flvxz.com, bt torrent ↔ magnet, ed2k 搜索, tumblr 图片下载, unzip

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

xiami.py error

Harry1993 opened this issue · 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.