def list_trash(cookie, tokens, path='/', page=1, num=100):
 url = ''.join([const.PAN_API_URL, 'recycle/list?channel=chunlei&clienttype=0&web=1', '&num=', str(num), '&t=', util.timestamp(), '&dir=', encoder.encode_uri_component(path), '&t=', util.latency(), '&order=time&desc=1', '&_=', util.timestamp(), '&bdstoken=', tokens['bdstoken']])
 req = net.urlopen(url, headers={'Cookie': cookie.header_output()})
 if req:
  content = req.data
  return json.loads(content.decode())
 else:
  return None

def list_trash ( cookie , tokens , path = '/' , page = 1 , num = 100 ) : url = '' . join ( [ const . PAN_API_URL , 'recycle/list?channel=chunlei&clienttype=0&web=1' , '&num=' , str ( num ) , '&t=' , util . timestamp ( ) , '&dir=' , encoder . encode_uri_component ( path ) , '&t=' , util . latency ( ) , '&order=time&desc=1' , '&_=' , util . timestamp ( ) , '&bdstoken=' , tokens [ 'bdstoken' ] ] ) req = net . urlopen ( url , headers = { 'Cookie' : cookie . header_output ( ) } ) if req : content = req . data return json . loads ( content . decode ( ) ) else : return None
path - 目录的绝对路径 .