羊毛系列-狗东图床
没啥可以写的,就是利用一下狗东的几个接口而已
1、php版
200, 'imgurl' => 'https://img' . rand(10, 20) . '.360buyimg.com/uba/' . $matches[1], ); // exit(json_encode($arr)); exit(header("Location: {$arr['imgurl']}")); function get_curl($url, $post = 0, $referer = 0, $cookie = 0, $header = 0, $ua = 0, $nobaody = 0) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); $httpheader[] = "Accept:application/json"; $httpheader[] = "Accept-Encoding:gzip,deflate,sdch"; $httpheader[] = "Accept-Language:zh-CN,zh;q=0.8"; $httpheader[] = "Connection:close"; curl_setopt($ch, CURLOPT_HTTPHEADER, $httpheader); if ($post) { curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $post); } if ($header) { curl_setopt($ch, CURLOPT_HEADER, true); } if ($cookie) { curl_setopt($ch, CURLOPT_COOKIE, $cookie); } if ($referer) { if ($referer == 1) { curl_setopt($ch, CURLOPT_REFERER, 'http://m.qzone.com/infocenter?g_f='); } else { curl_setopt($ch, CURLOPT_REFERER, $referer); } } if ($ua) { curl_setopt($ch, CURLOPT_USERAGENT, $ua); } else { curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Linux; U; Android 4.0.4; es-mx; HTC_One_X Build/IMM76D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0"); } if ($nobaody) { curl_setopt($ch, CURLOPT_NOBODY, 1); } curl_setopt($ch, CURLOPT_TIMEOUT, 3); curl_setopt($ch, CURLOPT_ENCODING, "gzip"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $ret = curl_exec($ch); curl_close($ch); return $ret; }
2、本地bat版
for %%i in (*.jpg *.png) do curl http://myjd.jd.com/afs/common/upload.action -L -A "Shockwave Flash" -i -X POST -F Filename=%%i -F upload="$!ceshi3" -F op=applyUpload -F Upload="Submit Query" -F filedata="@%cd%\%%i" >> File_1.txt findstr ""optDescription"" "File_1.txt">File_2.txt ::删除File_2中的前面58个字符 setlocal enabledelayedexpansion for /f %%i in ('type File_2.txt') do ( @set delbefore=%%i @echo !delbefore:~58!>>File_3.txt ) ::删除File_3中“,”及之后内容 for /f "delims=,,*" %%i in (File_3.txt) do (echo %%i>>File_4.txt) ::添加图片地址前缀https://img12.360buyimg.com/uba/,img12可以改成img10-20,随意就行 set before=https://img12.360buyimg.com/uba/ for /f "delims=" %%i in (File_4.txt) do ( if "%%i"=="" ( echo.>>File_5.txt ) else ( echo %before%%%i%after%>>File_5.txt ) ) ::删除特殊字符“"” set str1=" set new1= for /f "delims=" %%i in (File_5.txt) do ( set str=%%i set "str=!str:%str1%=%new1%!" echo !str!>>JDIMGURLS.txt ) ::清理文件并打开最终文件 del File_1.txt del File_2.txt del File_3.txt del File_4.txt del File_5.txt start JDIMGURLS.txt echo off
码字很辛苦,转载请注明来自非WEB-DL资源站的《羊毛系列-狗东图床》
2019-11-05
干货
评论
评论关闭