fix(doply/dood): wykrywaj usuniete wideo (fraza sie nie zgadzala)
Some checks failed
Backend tests / test (push) Has been cancelled
Some checks failed
Backend tests / test (push) Has been cancelled
Zgloszenie b52470be ('Doply resolver chyba padl', err 'Source error None of the').
Diagnoza: protokol dziala (doply -> playmogo, pass_md5 obecny, CDN oddaje 206
video/mp4), ale strona jawnie mowi '<h1>Not Found</h1> video you are looking for is
not found' - wideo jest USUNIETE. Detekcja szukala doslownej frazy 'video not found',
ktora w tym wariancie NIE pada, wiec resolver uznawal usuniete wideo za sukces.
Playmogo mimo usuniecia dalej wystawia token pass_md5 i serwuje plik-zaslepke, stad
u usera 'Source error' zamiast czytelnego komunikatu.
Rozszerzone markery: 'is not found', 'no_video_' (obrazek-zaslepka
i.doodcdn.io/img/no_video_3.svg - najpewniejszy), 'video has been deleted',
'file was deleted'. Blad 'video_deleted' jest NIEretryowalny, wiec apka od razu
pokaze komunikat i pozwoli oznaczyc zrodlo jako martwe.
This commit is contained in:
parent
4fd94de72d
commit
c849c4c8be
1 changed files with 14 additions and 1 deletions
|
|
@ -168,7 +168,20 @@ async function _continueAfterFetch(
|
|||
referer: string,
|
||||
): Promise<ResolveResult> {
|
||||
|
||||
if (html.toLowerCase().includes('video not found')) {
|
||||
// Usunięte wideo. UWAGA: sam wariant 'video not found' NIE wystarcza — playmogo/doply
|
||||
// renderuje "<h1>Not Found</h1> video you are looking for is not found" (zgłoszenie
|
||||
// b52470be), więc dokładna fraza nie pada. Co gorsza strona MIMO TO wystawia token
|
||||
// pass_md5, a CDN oddaje jakiś plik, więc bez tej detekcji resolver uznaje usunięte
|
||||
// wideo za sukces i user dostaje placeholder albo "Source error" z ExoPlayera.
|
||||
// `no_video_` to obrazek-zaślepka (i.doodcdn.io/img/no_video_3.svg) — najpewniejszy marker.
|
||||
const _low = html.toLowerCase();
|
||||
if (
|
||||
_low.includes('video not found') ||
|
||||
_low.includes('is not found') ||
|
||||
_low.includes('no_video_') ||
|
||||
_low.includes('video has been deleted') ||
|
||||
_low.includes('file was deleted')
|
||||
) {
|
||||
return { error: 'video_deleted' };
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue