fix(route): E站页面匹配规则已更新 (#11225)
This commit is contained in:
parent
1238376e74
commit
5890fc8007
|
|
@ -50,15 +50,27 @@ async function parsePage(cache, data, get_bittorrent = false, embed_thumb = fals
|
|||
// "l" for Compact
|
||||
// "e" for Extended
|
||||
// "t" for Thumbnail
|
||||
const layout = $('div#dms option[selected]').attr('value');
|
||||
let layout = 't';
|
||||
|
||||
let galleries;
|
||||
if (layout !== 't') {
|
||||
galleries = $('table[class^="itg glt"] tbody');
|
||||
} else {
|
||||
// Thumbnail layout has different page structure
|
||||
// resolve it here
|
||||
galleries = $('div[class^="itg gld"]');
|
||||
// "itg gld" for Thumbnail
|
||||
let galleries = $('div[class^="itg gld"]');
|
||||
// "itg gltm" for Minimal or Minimal+
|
||||
if (galleries.length <= 0) {
|
||||
galleries = $('table[class^="itg gltm"] tbody');
|
||||
layout = 'm';
|
||||
}
|
||||
// "itg gltc" for Compact
|
||||
if (galleries.length <= 0) {
|
||||
galleries = $('table[class^="itg gltc"] tbody');
|
||||
layout = 'l';
|
||||
}
|
||||
// "itg glte" for Extended
|
||||
if (galleries.length <= 0) {
|
||||
galleries = $('table[class^="itg glte"] tbody');
|
||||
layout = 'e';
|
||||
}
|
||||
if (galleries.length <= 0) {
|
||||
return [];
|
||||
}
|
||||
|
||||
async function parseElement(cache, element) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue