mirror of
https://github.com/qist/tvbox.git
synced 2026-06-18 23:53:25 +00:00
Add files via upload
This commit is contained in:
14
lib/util.js
14
lib/util.js
@@ -1,8 +1,8 @@
|
||||
import './uri.min.js'
|
||||
import cheerio from './cheerio.min.js';
|
||||
import './crypto-js.js'
|
||||
import './dayjs.min.js'
|
||||
import _ from './underscore-esm-min.js'
|
||||
import 'assets://js/lib/uri.min.js'
|
||||
import cheerio from 'assets://js/lib/cheerio.min.js';
|
||||
import 'assets://js/lib/crypto-js.js'
|
||||
import 'assets://js/lib/dayjs.min.js'
|
||||
import _ from 'assets://js/lib/underscore-esm-min.js'
|
||||
|
||||
var charStr = 'abacdefghjklmnopqrstuvwxyzABCDEFGHJKLMNOPQRSTUVWXYZ0123456789';
|
||||
export function randIndex(min, max, i) {
|
||||
@@ -235,7 +235,7 @@ export function pdfh(html, parse, base_url) {
|
||||
}
|
||||
let result = '';
|
||||
const $ = eleFind ? html.rr : cheerio.load(html);
|
||||
let ret = eleFind ? (parse === '*=*' ? html.ele : $(html.ele).find(parse)) : $(parse);
|
||||
let ret = eleFind ? ((parse === '*=*' || $(html.ele).is(parse)) ? html.ele : $(html.ele).find(parse)) : $(parse);
|
||||
if (option) {
|
||||
if (option === 'Text') {
|
||||
result = $(ret).text();
|
||||
@@ -274,7 +274,7 @@ export function pdfa(html, parse) {
|
||||
parse = sp.join(' ');
|
||||
}
|
||||
const $ = eleFind ? html.rr : cheerio.load(html);
|
||||
let ret = eleFind ? $(html.ele).find(parse) : $(parse);
|
||||
let ret = eleFind ? ($(html.ele).is(parse) ? html.ele : $(html.ele).find(parse)) : $(parse);
|
||||
let result = [];
|
||||
if (ret) {
|
||||
ret.each(function (idx, ele) {
|
||||
|
||||
Reference in New Issue
Block a user