# coding: utf-8
import requests
file = {'fn': open('ファイルパス', 'rb')}
response = requests.post('http://URL/upload.php',
{
'POST値1' : '値1',
'POST値2' : '値2'
},
files=file,
auth=('ID', 'パスワード')
)
Just another WordPress site
# coding: utf-8
import requests
file = {'fn': open('ファイルパス', 'rb')}
response = requests.post('http://URL/upload.php',
{
'POST値1' : '値1',
'POST値2' : '値2'
},
files=file,
auth=('ID', 'パスワード')
)