def cloud_query_sinfo(cookie, tokens, source_path):
 url = ''.join([const.PAN_URL, 'rest/2.0/services/cloud_dl?channel=chunlei&clienttype=0&web=1', '&method=query_sinfo&app_id=250528', '&bdstoken=', tokens['bdstoken'], '&source_path=', encoder.encode_uri_component(source_path), '&type=2', '&t=', util.timestamp()])
 req = net.urlopen(url, headers={'Cookie': cookie.header_output()})
 if req:
  content = req.data
  return json.loads(content.decode())
 else:
  return None

def cloud_query_sinfo ( cookie , tokens , source_path ) : url = '' . join ( [ const . PAN_URL , 'rest/2.0/services/cloud_dl?channel=chunlei&clienttype=0&web=1' , '&method=query_sinfo&app_id=250528' , '&bdstoken=' , tokens [ 'bdstoken' ] , '&source_path=' , encoder . encode_uri_component ( source_path ) , '&type=2' , '&t=' , util . timestamp ( ) ] ) req = net . urlopen ( url , headers = { 'Cookie' : cookie . header_output ( ) } ) if req : content = req . data return json . loads ( content . decode ( ) ) else : return None
source_path - bt种子的绝对路径 .