搜索API :params search_content: 搜索内容 :params search_type: 搜索类型 :params limit: 返回结果数量 :return: 字典.
(self, search_content, search_type, limit=9)
| 91 | return result |
| 92 | |
| 93 | def search(self, search_content, search_type, limit=9): |
| 94 | """ |
| 95 | 搜索API |
| 96 | :params search_content: 搜索内容 |
| 97 | :params search_type: 搜索类型 |
| 98 | :params limit: 返回结果数量 |
| 99 | :return: 字典. |
| 100 | """ |
| 101 | |
| 102 | url = 'http://music.163.com/weapi/cloudsearch/get/web?csrf_token=' |
| 103 | params = {'s': search_content, 'type': search_type, 'offset': 0, 'sub': 'false', 'limit': limit} |
| 104 | result = self.post_request(url, params) |
| 105 | return result |
| 106 | |
| 107 | def search_song(self, song_name, song_num, quiet=True, limit=9): |
| 108 | """ |
no test coverage detected