贴一下目前尝试的代码
import requests
import os
s = requests.session()
dst_url = '
https://www.freemypdf.com/#'filename = r'*.pdf'
headers = {
'Host': '
www.freemypdf.com',
'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:63.0) Gecko/20100101 Firefox/63.0',
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'Accept-Language': 'zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2',
'Accept-Encoding': 'gzip, deflate, br',
'Referer': '
https://www.freemypdf.com/' }
files = {
'origpdf':(os.path.basename(filename), open(filename, 'rb'), 'application/pdf')
}
r =
s.post(dst_url,headers = headers,files = files)