code: def requests_url(self, ptype, **data):
          
          options = {
              'type': ptype,
              'pt': '3.1',
              'channel': self._channel_id,
              'pb': '320',
              'from': 'mainsite',
              'r': '',
              'kbps': '320',
              'app_name': 'radio_website',
              'client': 's:mainsite|y:3.0',
              'version': '100'
          }
          if 'sid' in data:
              options['sid'] = data['sid']
          url = 'https://douban.fm/j/v2/playlist'
          while True:
              try:
                  s = requests.get(url, params=options,
                                   cookies=self._cookies, headers=HEADERS)
                  req_json = s.json()
                  if req_json['r'] == 0:
                      if 'song' not in req_json or not req_json['song']:
                          break
                      return req_json['song'][0]
              except Exception as err:
                  raise APIError(err)
                  break
          return None
docs: 这里包装了一个函数,发送post_data
          :param ptype: n 列表无歌曲,返回新列表
                        e 发送歌曲完毕
                        b 不再播放,返回新列表
                        s 下一首,返回新的列表
                        r 标记喜欢
                        u 取消标记喜欢