尝试的基本卷曲无效,wget也无效
from collections import defaultdict, Counter
def makeDict():
string = """abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890().,:;'" []//|\\!@#$%^&*_+-=<>?~`"""
overall = defaultdict(Counter)
dictionary = {}
listofstuff = list(string)
for i in listofstuff:
dictionary[str(i)] = 0
for a in listofstuff:
overall[str(a)] = {1 : dictionary, 2 : dictionary, 3 : dictionary}
return overall
空pdf或189字节
答案 0 :(得分:0)
只是网站在获取请求之前使用发布请求,并且您需要在应用程序上具有一定的逻辑之前将其伪造,现在它可以正常工作
答案 1 :(得分:-1)
在使用curl之前尝试urldecode
:
$ch = curl_init();
$url = urldecode($url);
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch,CURLOPT_USERAGENT,'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13');
curl_setopt($ch, CURLOPT_ENCODING, "utf-8");
echo $output=curl_exec($ch);
curl_close($ch);