嘿,我想下载我的私人粘贴通过一个批处理/cmd文件与使用 curl ,因为它是privat我必须登录与我的API开发密钥,但这不工作输出是一些html代码
我已经试过了,但没有成功,我不知道为什么。curl -s -o sdggsd.txt -d "api_dev_key=key" https://pastebin.com/raw/link
编辑:现在我也尝试了这个,但它说没有指定的网址。
curl -d 'api_dev_key=key' -d 'api_user_name=name' -d 'api_user_password=pass' -o sdggsd.txt "https://pastebin.com/raw/url"
编辑:因此,这段代码的工作,但它输出的文件只有html代码:(而不是代码,是在网站上
curl -o st.txt -d 'api_dev_key=key' -d 'api_user_name=user' -d 'api_user_password=pass' https://pastebin.com/raw/url
命令的st.txt文件结果:
curl -o st.txt -d 'api_dev_key=key' -d 'api_user_name=user' -d 'api_user_password=pass' "https://pastebin.com/raw/url"
结果为st.txt:
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=0.75, maximum-scale=1.0, user-scalable=yes" />
<script async src="https://www.googletagmanager.com/gtag/js?id=G-S72LBY47R8"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', "G-S72LBY47R8");
</script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Pastebin.com - Bad Request (#400)</title>
<link rel="shortcut icon" href="/favicon.ico" />
<meta name="description" content="Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time." />
<meta property="og:description" content="Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time." />
<meta property="fb:app_id" content="231493360234820" />
<meta property="og:title" content="Pastebin.com - Bad Request (#400)" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://pastebin.com/raw/url" />
<meta property="og:image" content="https://pastebin.com/i/facebook.png" />
<meta property="og:site_name" content="Pastebin" />
<meta name="google-site-verification" content="jkUAIOE8owUXu8UXIhRLB9oHJsWBfOgJbZzncqHoF4A" />
<link rel="canonical" href="https://pastebin.com/raw/url" />
<meta name="csrf-param" content="_csrf-frontend">
<meta name="csrf-token" content="BBCH6PRTqsfFEJnQk2n_8j6Jfe7FUMIOP34snpj8SidSQe69sD_JiapZzZX5G8eHDucP24MfqHx7HXWt_pQhRQ==">
<link href="/assets/c80611c4/css/bootstrap.min.css" rel="stylesheet">
<link href="/assets/a25015e7/dist/bootstrap-tagsinput.css" rel="stylesheet">
<link href="/themes/pastebin/css/vendors.bundle.css?d9b75a0225d98a07f54f" rel="stylesheet">
<link href="/themes/pastebin/css/app.bundle.css?d9b75a0225d98a07f54f" rel="stylesheet">
</head>
<body class="night-auto " data-pr="x2xy94pJ" data-pa="" data-sar="1" data-abd="1" data-bd="1">
<svg style="height: 0; width: 0; position: absolute; visibility: hidden" xmlns="http://www.w3.org/2000/svg">
<symbol id="add" viewBox="0 0 1024 1024"><path fill="#ccc" d="M512 16C238 16 16 238 16 512s222 496 496 496 496-222 496-496S786 16 512 16z m288 552c0 13.2-10.8 24-24 24h-184v184c0 13.2-10.8 24-24 24h-112c-13.2 0-24-10.8-24-24v-184h-184c-13.2 0-24-10.8-24-24v-112c0-13.2 10.8-24 24-24h184v-184c0-13.2 10.8-24 24-24h112c13.2 0 24 10.8 24 24v184h184c13.2 0 24 10.8 24 24v112z"/></symbol>
<symbol id="search" viewBox="0 0 512 512"><path fill="#ccc" d="M354.2,216c0-38.2-13-70.7-40-97.7c-27-27-59.6-40-97.7-40s-70.7,13-97.7,40s-40,59.6-40,97.7 s13,70.7,40,97.7s59.6,40,97.7,40s70.7-13,97.7-40C340.2,285.8,354.2,253.2,354.2,216z M511.5,472c0,10.2-3.7,19.5-12.1,27.9 c-8.4,8.4-16.8,12.1-27.9,12.1c-11.2,0-20.5-3.7-27.9-12.1L339.3,393.8c-37.2,26.1-78.2,38.2-122.9,38.2 c-29.8,0-57.7-5.6-83.8-16.8c-27-11.2-50.3-27-68.9-46.5s-34.4-42.8-46.5-68.9C6.1,272.8,0.5,244.8,0.5,216s5.6-57.7,16.8-83.8 c11.2-27,27-50.3,46.5-68.9s42.8-34.4,68.9-46.5C159.7,5.6,187.6,0,216.4,0s57.7,5.6,83.8,16.8c27,11.2,50.3,27,68.9,46.5 c18.6,19.5,34.4,42.8,46.5,68.9c11.2,27,16.8,54.9,16.8,83.8c0,44.7-13,85.6-38.2,122.9L499.4,444 C507.8,451.5,511.5,460.8,511.5,472z"/></g></symbol>
</svg>
<div class="wrap">
<div class="header">
<div class="container">
<div class="header__container">
<div class="header__left">
<a class="header__logo" href="/">
Pastebin </a>
<div class="header__links h_1024">
<a href="/doc_api">API</a>
<a href="/tools">tools</a>
<a href="/faq">faq</a>
</div>
<a class="header__btn" href="/">
paste </a>
<div class="header__search">
<form id="w0" class="search_form" action="https://pastebin.com/search" method="get">
<input type="text" id="q" class="search_input" name="q" maxlength="128" placeholder="Search...">
<button type="submit" class="search_btn"><svg class="icon search"><use xlink:href="#search"></use></svg></button>
</form> </div>
</div>
<div class="header__right">
<div class="header_sign">
<a href="/login" class="btn-sign sign-in">Login</a>
<a href="/signup" class="btn-sign sign-up">Sign up</a>
</div>
</div>
</div>
</div>
</div>
<div class="container">
<div class="content">
<div class="page -top -right">
<div class="content__title">Bad Request (#400)</div>
<div class="content__text">
<div class="notice -no-margin">
Unable to verify your data submission. </div>
</div>
</div>
<div style="clear: both;"></div>
</div>
<div class="sidebar h_1024">
<div class="sidebar__title">
<a href="/archive">Public Pastes</a>
</div>
<ul class="sidebar__menu">
<li>
<a href="/iFuBSXP1">BTC Wallet Credentials have been reset</a>
<div class="details">
GetText |
3 min ago
| 0.24 KB </div>
</li>
<li>
<a href="/vF3axSgu">Link crash</a>
<div class="details">
Java |
22 min ago
| 2.37 KB </div>
</li>
<li>
<a href="/gip3QbEX">Untitled</a>
<div class="details">
Lua |
44 min ago
| 3.51 KB </div>
</li>
<li>
<a href="/LGiNgvMF">Untitled</a>
<div class="details">
Python |
47 min ago
| 2.60 KB </div>
</li>
<li>
<a href="/jFSDzvks">Dig</a>
<div class="details">
Lua |
1 hour ago
| 2.28 KB </div>
</li>
<li>
<a href="/fCVJabwN">bot.lua</a>
<div class="details">
Lua |
1 hour ago
| 1.27 KB </div>
</li>
<li>
<a href="/CX6NWCqD">Quirk Command</a>
<div class="details">
JavaScript |
1 hour ago
| 3.30 KB </div>
</li>
<li>
<a href="/cua5U8BE">bot.lua</a>
<div class="details">
Lua |
1 hour ago
| 1.25 KB </div>
</li>
</ul>
<div class="sidebar__sticky -on">
</div>
</div>
</div>
</div>
<div class="top-footer">
<a class="icon-link -size-24-24 -chrome" href="/tools#chrome" title="Google Chrome Extension"></a>
<a class="icon-link -size-24-24 -firefox" href="/tools#firefox" title="Firefox Extension"></a>
<a class="icon-link -size-24-24 -iphone" href="/tools#iphone" title="iPhone/iPad Application"></a>
<a class="icon-link -size-24-24 -windows" href="/tools#windows" title="Windows Desktop Application"></a>
<a class="icon-link -size-24-24 -android" href="/tools#android" title="Android Application"></a>
<a class="icon-link -size-24-24 -macos" href="/tools#macos" title="MacOS X Widget"></a>
<a class="icon-link -size-24-24 -opera" href="/tools#opera" title="Opera Extension"></a>
<a class="icon-link -size-24-24 -unix" href="/tools#pastebincl" title="Linux Application"></a>
</div>
<footer class="footer">
<div class="container">
<div class="footer__container">
<div class="footer__left">
<a href="/">create new paste</a> <span class="footer__devider"> / </span>
<a href="/languages">syntax languages</a> <span class="footer__devider"> / </span>
<a href="/archive">archive</a> <span class="footer__devider"> / </span>
<a href="/faq">faq</a> <span class="footer__devider"> / </span>
<a href="/tools">tools</a> <span class="footer__devider"> / </span>
<a href="/night_mode">night mode</a> <span class="footer__devider"> / </span>
<a href="/doc_api">api</a> <span class="footer__devider"> / </span>
<a href="/doc_scraping_api">scraping api</a> <span class="footer__devider"> / </span>
<a href="/news">news</a> <span class="footer__devider"> / </span>
<a href="/pro" class="pro">pro</a>
<br>
<a href="/doc_privacy_statement">privacy statement</a> <span class="footer__devider"> / </span>
<a href="/doc_cookies_policy">cookies policy</a> <span class="footer__devider"> / </span>
<a href="/doc_terms_of_service">terms of service</a><sup style="color:#999">updated</sup> <span class="footer__devider"> / </span>
<a href="/doc_security_disclosure">security disclosure</a> <span class="footer__devider"> / </span>
<a href="/dmca">dmca</a> <span class="footer__devider"> / </span>
<a href="/report-abuse">report abuse</a> <span class="footer__devider"> / </span>
<a href="/contact">contact</a>
<br>
<br>
<span class="footer__bottom h_800">
By using Pastebin.com you agree to our <a href="/doc_cookies_policy">cookies policy</a> to enhance your experience.
<br>
Site design & logo © 2023 Pastebin</span>
</div>
<div class="footer__right h_1024">
<a class="icon-link -size-40-40 -facebook-circle" href="https://facebook.com/pastebin" rel="nofollow" title="Like us on Facebook" target="_blank"></a>
<a class="icon-link -size-40-40 -twitter-circle" href="https://twitter.com/pastebin" rel="nofollow" title="Follow us on Twitter" target="_blank"></a>
</div>
</div>
</div>
</footer>
<div class="popup-container">
<div class="popup-box -cookies" data-name="l2c_1">
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the <a href="/doc_cookies_policy">Cookies Policy</a>. <span class="cookie-button js-close-cookies">OK, I Understand</span>
</div>
<div class="popup-box -pro" data-name="l2c_2_pg">
<div class="pro-promo-img">
<a href="/signup">
<img src="/themes/pastebin/img/hello.png" alt=""/>
</a>
</div>
<div class="pro-promo-text">
Not a member of Pastebin yet?<br/>
<a href="/signup"><b>Sign Up</b></a>, it unlocks many cool features! </div>
<div class="close js-close-pro-guest" title="Close Me"> </div>
</div>
</div>
<span class="cd-top"></span>
<script src="/assets/9ce1885/jquery.min.js"></script>
<script src="/assets/f04f76b8/yii.js"></script>
<script src="/assets/a25015e7/dist/bootstrap-tagsinput.js"></script>
<script>
const POST_EXPIRATION_NEVER = 'N';
const POST_EXPIRATION_BURN = 'B';
const POST_STATUS_PUBLIC = '0';
const POST_STATUS_UNLISTED = '1';
</script>
<script src="/themes/pastebin/js/vendors.bundle.js?d9b75a0225d98a07f54f"></script>
<script src="/themes/pastebin/js/app.bundle.js?d9b75a0225d98a07f54f"></script>
1条答案
按热度按时间b91juud31#
你需要 curl 原始文本,而不是网站。一个raw paste(或者github文件)将只有文本,没有标签。