def share_transfer(cookie, tokens, shareid, uk, filelist, dest, upload_mode):
 ondup = const.UPLOAD_ONDUP[upload_mode]
 url = ''.join([const.PAN_URL, 'share/transfer?app_id=250528&channel=chunlei&clienttype=0&web=1', '&bdstoken=', tokens['bdstoken'], '&from=', uk, '&shareid=', shareid, '&ondup=', ondup, '&async=1'])
 data = ''.join(['path=', encoder.encode_uri_component(dest), '&filelist=', encoder.encode_uri_component(json.dumps(filelist))])
 req = net.urlopen(url, headers={'Cookie': cookie.header_output(), 'Content-Type': const.CONTENT_FORM_UTF8}, data=data.encode())
 if req:
  content = req.data.decode()
  return json.loads(content)
 else:
  return None

def share_transfer ( cookie , tokens , shareid , uk , filelist , dest , upload_mode ) : ondup = const . UPLOAD_ONDUP [ upload_mode ] url = '' . join ( [ const . PAN_URL , 'share/transfer?app_id=250528&channel=chunlei&clienttype=0&web=1' , '&bdstoken=' , tokens [ 'bdstoken' ] , '&from=' , uk , '&shareid=' , shareid , '&ondup=' , ondup , '&async=1' ] ) data = '' . join ( [ 'path=' , encoder . encode_uri_component ( dest ) , '&filelist=' , encoder . encode_uri_component ( json . dumps ( filelist ) ) ] ) req = net . urlopen ( url , headers = { 'Cookie' : cookie . header_output ( ) , 'Content-Type' : const . CONTENT_FORM_UTF8 } , data = data . encode ( ) ) if req : content = req . data . decode ( ) return json . loads ( content ) else : return None
uk - 其他用户的uk filelist - 要转移文件的列表 .