Created
December 17, 2019 09:48
-
-
Save lizhaode/55d7211672f1c8065529e34b4d111027 to your computer and use it in GitHub Desktop.
send aria task by http
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
base_url = 'http://1.1.1.1:6800/jsonrpc' | |
data = { | |
'jsonrpc': '2.0', | |
'method': 'aria2.addUri', | |
'id': '0', | |
'params': ['token:', ['https://example.com/file'], {'out': 'aaa', 'dir': '/opt/drive/bbb'}] | |
} | |
re = requests.post(base_url, json=data) | |
print(re.text) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment