Demo entry 6323089

py

   

Submitted by zeliges on Nov 13, 2016 at 05:57
Language: Python 3. Code size: 725 Bytes.

import requests
import re
import urllib

keyword = input("keyword:")
key = urllib.parse.quote(keyword)
payload = {
    'callCount': '1',
    'scriptSessionId': '${scriptSessionId}190',
    'httpSessionId': 'f090ee8789f5413792d5b5eed4568e82',
    'c0-scriptName': 'OpenSearchBean',
    'c0-methodName': 'searchVideo',
    'c0-id': '0',
    'c0-param0': 'string:{0}'.format(key),
    'c0-param1': 'number:1',
    'c0-param2': 'number:100',
    'batchId': '1478666899720'
    }
data = requests.post("http://c.open.163.com/dwr/call/plaincall/OpenSearchBean.searchVideo.dwr", data=payload).text
reg = re.compile("http://open.163.com.*?\.html")
links = re.findall(reg, data)
for link in links:
    print(link)

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).