chore(extractor): handle Dropload queued files better
This commit is contained in:
parent
f7b22f61b3
commit
adae573a0f
4 changed files with 438 additions and 1 deletions
|
|
@ -18,4 +18,8 @@ describe('Dropload', () => {
|
|||
test('file not found', async () => {
|
||||
expect(await extractorRegistry.handle(ctx, new URL('https://dropload.io/asdfghijklmn.html'), CountryCode.de)).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('processing / internal problem', async () => {
|
||||
expect(await extractorRegistry.handle(ctx, new URL('https://dropload.io/7xtxuac84xyh.html'), CountryCode.de)).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ export class Dropload extends Extractor {
|
|||
protected async extractInternal(ctx: Context, url: URL, countryCode: CountryCode): Promise<UrlResult[]> {
|
||||
const html = await this.fetcher.text(ctx, url);
|
||||
|
||||
if (html.includes('File Not Found')) {
|
||||
if (html.includes('File Not Found') || html.includes('Pending in queue')) {
|
||||
throw new NotFoundError();
|
||||
}
|
||||
|
||||
|
|
|
|||
431
src/extractor/__fixtures__/Dropload/https:dropload.io7xtxuac84xyh.html
generated
Normal file
431
src/extractor/__fixtures__/Dropload/https:dropload.io7xtxuac84xyh.html
generated
Normal file
|
|
@ -0,0 +1,431 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Dropload - Revolution Video Hosting</title>
|
||||
|
||||
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="theme-color" content="#FFF">
|
||||
<meta name="format-detection" conten="telephone=no">
|
||||
<link rel="apple-touch-icon" href="https://dropload.io/assets2/images/favicon/apple-touch-icon.png" sizes="180x180">
|
||||
<link rel="icon" href="https://dropload.io/assets2/images/favicon/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" href="https://dropload.io/assets2/images/favicon/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://dropload.io/assets2/images/favicon/manifest.json">
|
||||
<link rel="icon" href="https://dropload.io/assets2/images/favicon/favicon.ico">
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="crossorigin">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;700&display=swap" rel="stylesheet">
|
||||
<link href="https://dropload.io/assets2/css/style.css?v=2" rel="stylesheet">
|
||||
<script src="https://code.jquery.com/jquery-3.2.1.min.js" type="1198ec03089106bda1a7dcfc-text/javascript"></script>
|
||||
<script src="https://dropload.io/assets2/js/bootstrap.bundle.min.js" type="1198ec03089106bda1a7dcfc-text/javascript"></script>
|
||||
<script src="https://dropload.io/assets2/js/xupload.js?v=13" type="1198ec03089106bda1a7dcfc-text/javascript"></script>
|
||||
<script src="https://dropload.io/assets2/js/app.js" type="1198ec03089106bda1a7dcfc-text/javascript"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header class="header">
|
||||
<div class="container">
|
||||
<div class="row align-items-center flex-nowrap">
|
||||
<div class="col-auto d-lg-none me-auto">
|
||||
<div class="dropdown">
|
||||
<button class="btn icon-btn text-primary" data-bs-toggle="dropdown" data-bs-offset="0, 16">
|
||||
<i class="icon icon-menu icon-size-18"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-end">
|
||||
|
||||
<a href="/?op=registration" class="dropdown-item">Upload</a>
|
||||
|
||||
<a href="/make_money.html" class="dropdown-item">Earn money</a>
|
||||
<a href="/api.html" class="dropdown-item">Service API</a>
|
||||
<a href="/tos" class="dropdown-item">Terms and Conditions</a>
|
||||
<a href="/contact" class="dropdown-item">Contacts</a>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-auto me-lg-5">
|
||||
<a href="/">
|
||||
<img src="https://dropload.io/assets2/images/logo.svg" class="logo" alt="Dropload.io - ">
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-auto d-none d-lg-block">
|
||||
<nav class="nav">
|
||||
|
||||
<a href="/?op=registration" class="nav-link">Upload</a>
|
||||
|
||||
<a href="/make_money.html" class="nav-link">Earn money</a>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-auto d-none d-lg-block ms-auto">
|
||||
<a href="/login.html" class="btn login-btn me-2">
|
||||
<i class="icon icon-account me-2"></i>Login</a>
|
||||
<a href="/?op=registration" class="btn reg-btn">Create an Account</a>
|
||||
</div>
|
||||
|
||||
<div class="col-auto d-lg-none ms-auto">
|
||||
<div class="dropdown">
|
||||
<button class="btn icon-btn text-primary" data-bs-toggle="dropdown" data-bs-offset="0, 16">
|
||||
<i class="icon icon-account icon-size-18"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-end">
|
||||
<li>
|
||||
<a class="dropdown-item" href="/login.html">Login</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="dropdown-item" href="/?op=registration">Create an Account</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<main>
|
||||
|
||||
|
||||
<script src="https://dropload.io/js/jquery.cookie.js" type="1198ec03089106bda1a7dcfc-text/javascript"></script>
|
||||
|
||||
|
||||
|
||||
<script type="1198ec03089106bda1a7dcfc-text/javascript">
|
||||
$.cookie('file_id', '1062326', { expires: 10 });
|
||||
$.cookie('aff', '1805', { expires: 10 });
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section class="mb-5 mb-lg-7">
|
||||
<div class="container">
|
||||
<div class="videoplayer">
|
||||
<div class="videoplayer-embed">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<img src="https://img.dropload.io/7xtxuac84xyh.jpg" alt="">
|
||||
|
||||
<div class="encoding">
|
||||
<div class="encoding-body">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-auto">
|
||||
<div class="percent">
|
||||
75%
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<h6>Pending in queue</h6>
|
||||
<small class="text-light">Video is processing now.<br>Conversion stage: <span id='enc_pp'>...</span></small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="lightdown-backdrop"></div>
|
||||
|
||||
<h1>Bates Motel 2x3 </h1>
|
||||
<div class="videoplayer-controlbar">
|
||||
<div class="row g-1">
|
||||
<div class="col-auto flex-grow-1 flex-shrink-1 mw-0">
|
||||
<div class="videoplayer-details">
|
||||
<div class="row align-items-center flex-nowrap">
|
||||
<div class="col-auto flex-shrink-1 mw-0">
|
||||
<div class="row flex-lg-nowrap">
|
||||
|
||||
|
||||
<div class="col-auto d-flex align-items-center">
|
||||
<i class="icon icon-clock icon-size-16 me-2 opacity-50"></i>
|
||||
on Aug 6, 2024
|
||||
</div>
|
||||
|
||||
<div class="col-auto d-flex align-items-center">
|
||||
<i class="icon icon-download2 icon-size-16 me-2 opacity-50"></i>
|
||||
<span id="size"></span>
|
||||
</div>
|
||||
<div class="col-auto d-flex align-items-center">
|
||||
<i class="icon icon-clock icon-size-16 me-2 opacity-50"></i>
|
||||
00:42:55
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-auto d-flex align-items-center">
|
||||
|
||||
<button class="btn icon-btn me-4" data-bs-toggle="modal" data-bs-target="#modal_addplaylist">
|
||||
<i class="icon icon-addlist icon-size-16"></i>
|
||||
</button>
|
||||
<button type="button" class="btn icon-btn text-danger" data-bs-toggle="modal" data-bs-target="#modal_flag">
|
||||
<i class="icon icon-flag icon-size-16"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<button class="btn btn-like border-0" onclick="if (!window.__cfRLUnblockHandlers) return false; return jah('/?op=vote&file_code=7xtxuac84xyh&v=up')" title="Like" data-cf-modified-1198ec03089106bda1a7dcfc-="">
|
||||
<i class="icon icon-like icon-size-16 me-2"></i>
|
||||
<span id="likes_num">0</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<button class="btn btn-dislike border-0" onclick="if (!window.__cfRLUnblockHandlers) return false; return jah('/?op=vote&file_code=7xtxuac84xyh&v=down')" title="Don't Like" data-cf-modified-1198ec03089106bda1a7dcfc-="">
|
||||
<i class="icon icon-dislike icon-size-16 me-2"></i>
|
||||
<span id="dislikes_num">0</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="mb-5">
|
||||
<div class="row justify-content-center justify-content-lg-between">
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="col-12 col-lg-7 mb-3">
|
||||
<div class="copybox">
|
||||
<textarea class="form-control copy-source" rows="6"><IFRAME SRC="https://dropload.io/e/7xtxuac84xyh" FRAMEBORDER=0 MARGINWIDTH=0 MARGINHEIGHT=0 SCROLLING=NO WIDTH=640 HEIGHT=360 allowfullscreen></IFRAME></textarea>
|
||||
<button class="btn btn-primary" onclick="if (!window.__cfRLUnblockHandlers) return false; copy(this);" data-cf-modified-1198ec03089106bda1a7dcfc-="">Copy</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
<div class="modal fade" id="modal_flag" tabindex="-1">
|
||||
<div class="modal-dialog modal-dialog-centered">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h1 class="modal-title fs-5">Flag</h1>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body pt-0">
|
||||
<form method="POST" action="/" onsubmit="if (!window.__cfRLUnblockHandlers) return false; $.post('/',$(this).serialize(),function(code){ eval(code); } );return false;" data-cf-modified-1198ec03089106bda1a7dcfc-="">
|
||||
<input type="hidden" name="op" value="report_file">
|
||||
<input type="hidden" name="file_code" value="7xtxuac84xyh">
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Reason:</label>
|
||||
<select class="form-select" name="report_type">
|
||||
<option>Broken video</option>
|
||||
<option>Wrong title/description</option>
|
||||
<option>Copyright restriction</option>
|
||||
<option>Other</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<textarea name="report_info" class="form-control" rows="2" placeholder="Details"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="text-center">
|
||||
<input type="submit" name="add" value="Send Report" class="btn btn-gradient submit-btn">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="modal_addplaylist" tabindex="-1">
|
||||
<div class="modal-dialog modal-dialog-centered">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h1 class="modal-title fs-5">Add to</h1>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body pt-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="modal_share" tabindex="-1">
|
||||
<div class="modal-dialog modal-dialog-centered">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h1 class="modal-title fs-5">Share</h1>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body pt-0">
|
||||
|
||||
|
||||
Share code
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<style media="screen">
|
||||
.lightdown {
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
right: 20px;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Cpath fill-rule='evenodd' fill='%23FFF' d='M10 20c-1.654 0-3-1.346-3-3v-.531c0-.625-.254-1.237-.695-1.679l-.548-.548A5.96 5.96 0 0 1 4 10c0-1.603.624-3.109 1.757-4.243A5.961 5.961 0 0 1 10 4a5.96 5.96 0 0 1 4.242 1.757A5.96 5.96 0 0 1 16 10a5.957 5.957 0 0 1-1.758 4.242l-.546.547a2.396 2.396 0 0 0-.696 1.68V17c0 1.654-1.346 3-3 3Zm-1.025-4c.017.154.025.311.025.469V17a1.001 1.001 0 0 0 2 0v-.531c0-.158.008-.315.024-.469H8.975Zm-.737-2h3.524c.152-.222.325-.431.519-.624l.546-.547A3.974 3.974 0 0 0 14 10a3.975 3.975 0 0 0-1.172-2.829c-1.512-1.51-4.146-1.51-5.657 0A3.978 3.978 0 0 0 6 10c0 1.068.416 2.072 1.171 2.828h.001l.547.548c.194.194.367.402.519.624ZM19 11h-1a1 1 0 1 1 0-2h1a1 1 0 1 1 0 2ZM2 11H1a1 1 0 1 1 0-2h1a1 1 0 0 1 0 2Zm13.657-5.657a.999.999 0 0 1-.707-1.707l.707-.707a1 1 0 0 1 1.414 1.414l-.707.707a.993.993 0 0 1-.707.293Zm-11.314 0a.993.993 0 0 1-.707-.293l-.707-.707a.999.999 0 1 1 1.414-1.414l.707.707a.999.999 0 0 1-.707 1.707ZM10 3a1 1 0 0 1-1-1V1a1 1 0 0 1 2 0v1a1 1 0 0 1-1 1Z'/%3E%3C/svg%3E") no-repeat center;
|
||||
background-color: rgba(28,37,52,.75);
|
||||
transition: .25s;
|
||||
opacity: 0;
|
||||
}
|
||||
.videoplayer-embed:hover .lightdown {
|
||||
opacity: 1;
|
||||
}
|
||||
.body-lightdown .lightdown {
|
||||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Cpath fill-rule='evenodd' fill='%233DB6D4' d='M10 20c-1.654 0-3-1.346-3-3v-.531c0-.625-.254-1.237-.695-1.679l-.548-.548A5.96 5.96 0 0 1 4 10c0-1.603.624-3.109 1.757-4.243A5.961 5.961 0 0 1 10 4a5.96 5.96 0 0 1 4.242 1.757A5.96 5.96 0 0 1 16 10a5.957 5.957 0 0 1-1.758 4.242l-.546.547a2.396 2.396 0 0 0-.696 1.68V17c0 1.654-1.346 3-3 3Zm-1.025-4c.017.154.025.311.025.469V17a1.001 1.001 0 0 0 2 0v-.531c0-.158.008-.315.024-.469H8.975Zm-.737-2h3.524c.152-.222.325-.431.519-.624l.546-.547A3.974 3.974 0 0 0 14 10a3.975 3.975 0 0 0-1.172-2.829c-1.512-1.51-4.146-1.51-5.657 0A3.978 3.978 0 0 0 6 10c0 1.068.416 2.072 1.171 2.828h.001l.547.548c.194.194.367.402.519.624ZM19 11h-1a1 1 0 1 1 0-2h1a1 1 0 1 1 0 2ZM2 11H1a1 1 0 1 1 0-2h1a1 1 0 0 1 0 2Zm13.657-5.657a.999.999 0 0 1-.707-1.707l.707-.707a1 1 0 0 1 1.414 1.414l-.707.707a.993.993 0 0 1-.707.293Zm-11.314 0a.993.993 0 0 1-.707-.293l-.707-.707a.999.999 0 1 1 1.414-1.414l.707.707a.999.999 0 0 1-.707 1.707ZM10 3a1 1 0 0 1-1-1V1a1 1 0 0 1 2 0v1a1 1 0 0 1-1 1Z'/%3E%3C/svg%3E");
|
||||
}
|
||||
.lightdown-backdrop {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba(0,0,0,.9);
|
||||
display: none;
|
||||
z-index: 1999;
|
||||
}
|
||||
.body-lightdown .lightdown-backdrop {
|
||||
display: block;
|
||||
}
|
||||
.body-lightdown .videoplayer-embed {
|
||||
z-index: 2000;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script type="1198ec03089106bda1a7dcfc-text/javascript">
|
||||
$('.lightdown').on('click', function(){
|
||||
$('body').toggleClass('body-lightdown');
|
||||
})
|
||||
</script>
|
||||
|
||||
<Script type="1198ec03089106bda1a7dcfc-text/javascript">
|
||||
$("#embed_div textarea").focus(function (){ $(this).select(); })
|
||||
var tab_cookie='tab_down';
|
||||
|
||||
$('ul.tabs').on('click', 'li:not(.current)', function() {
|
||||
$(this).addClass('current').siblings().removeClass('current')
|
||||
.parents('div.section').find('div.box').eq($(this).index()).fadeIn(150).siblings('div.box').hide();
|
||||
});
|
||||
|
||||
$("#iew,#ieh").change(function (){
|
||||
var ww = $("#iew").val();
|
||||
var hh = $("#ieh").val();
|
||||
ww = ww.replace(/\D/g,'');
|
||||
hh = hh.replace(/\D/g,'');
|
||||
if(!ww)ww=640;
|
||||
if(!hh)hh=360;
|
||||
tt = $("#iet").val();
|
||||
tt = tt.replace(/ WIDTH=\d+ HEIGHT=\d+ /,' WIDTH='+ww+' HEIGHT='+hh+' ');
|
||||
$("#iet").val(tt);
|
||||
});
|
||||
|
||||
|
||||
encStatus('1062326',1);
|
||||
|
||||
</Script>
|
||||
<script src="https://dropload.io/js/tabber.js" type="1198ec03089106bda1a7dcfc-text/javascript"></script>
|
||||
|
||||
|
||||
<Script type="1198ec03089106bda1a7dcfc-text/javascript">
|
||||
$(function() {
|
||||
|
||||
});
|
||||
</Script>
|
||||
<script data-cfasync="false" async type="text/javascript" src="//en.almanpureed.com/rWm0dvLNb29/111561"></script>
|
||||
<script src='https://dropload.io/tag2.js' type="1198ec03089106bda1a7dcfc-text/javascript"></script>
|
||||
<script src='https://dropload.io/tag1.js' type="1198ec03089106bda1a7dcfc-text/javascript"></script>
|
||||
|
||||
|
||||
<!-- Javascript Alt Ads code start -->
|
||||
<!-- Javascript Alt Ads code end -->
|
||||
|
||||
|
||||
</main>
|
||||
|
||||
|
||||
<footer class="footer">
|
||||
<div class="container">
|
||||
<div class="row text-center text-lg-start flex-lg-nowrap">
|
||||
<div class="col">
|
||||
<div class="mb-3">
|
||||
<a href="/">
|
||||
<img src="https://dropload.io/assets2/images/logo.svg" alt="">
|
||||
</a>
|
||||
</div>
|
||||
<div class="text-muted mb-4 small">© 2025 Dropload - Revolution Video Hosting. All rights reserved.</div>
|
||||
</div>
|
||||
<div class="col d-none d-lg-block">
|
||||
<div class="nav flex-column mb-3">
|
||||
<a href="/faq" class="nav-link">FAQ</a>
|
||||
<a href="/contact" class="nav-link">Contact Us</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col d-none d-lg-block">
|
||||
<div class="nav flex-column mb-3">
|
||||
<a href="/tos" class="nav-link">Terms of service</a>
|
||||
<a href="#" class="nav-link">Privacy Policy</a>
|
||||
<a href="#" class="nav-link">Copyright Policy</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col d-none d-lg-block">
|
||||
<div class="nav flex-column mb-3">
|
||||
<a href="/api.html" class="nav-link">API</a>
|
||||
<a href="/make_money.html" class="nav-link">Make Money</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script src="/cdn-cgi/scripts/7d0fa10a/cloudflare-static/rocket-loader.min.js" data-cf-settings="1198ec03089106bda1a7dcfc-|49" defer></script></body>
|
||||
|
||||
</html>
|
||||
|
||||
|
||||
|
|
@ -21,3 +21,5 @@ exports[`Dropload dropload.io 1`] = `
|
|||
`;
|
||||
|
||||
exports[`Dropload file not found 1`] = `[]`;
|
||||
|
||||
exports[`Dropload processing / internal problem 1`] = `[]`;
|
||||
|
|
|
|||
Loading…
Reference in a new issue