drpy2.min.js 360 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933
  1. <!DOCTYPE html>
  2. <html lang="zh-CN" class="theme-gitea">
  3. <head data-suburl="">
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <meta http-equiv="x-ua-compatible" content="ie=edge">
  7. <title>guot54/ygbhx - lib/drpy2.min.js at master - Agit</title>
  8. <meta name="theme-color" content="#6cc644">
  9. <meta name="author" content="guot54" />
  10. <meta name="description" content="ygbhx" />
  11. <meta name="keywords" content="go,git,self-hosted,gitea">
  12. <meta name="referrer" content="no-referrer" />
  13. <meta name="_csrf" content="-_9D8MG3pwscN4vzfUyrp2-pZpw6MTY5MzU3MTE2MzQ1NzgwNDcyOA" />
  14. <meta name="_suburl" content="" />
  15. <meta name="_uid" content="1376" />
  16. <script>
  17. window.config = {
  18. AppVer: 'gitea模板还原\u002b138-g943c8c71f',
  19. AppSubUrl: '',
  20. StaticUrlPrefix: '',
  21. UseServiceWorker: true ,
  22. csrf: '-_9D8MG3pwscN4vzfUyrp2-pZpw6MTY5MzU3MTE2MzQ1NzgwNDcyOA',
  23. HighlightJS: false,
  24. SimpleMDE: false,
  25. Tribute: false,
  26. U2F: false,
  27. Heatmap: false,
  28. heatmapUser: null,
  29. NotificationSettings: {
  30. MinTimeout: 10000 ,
  31. TimeoutStep: 10000 ,
  32. MaxTimeout: 60000 ,
  33. EventSourceUpdateTime: 10000 ,
  34. },
  35. PageIsProjects: false,
  36. };
  37. </script>
  38. <link rel="icon" href="/img/favicon.svg" type="image/svg+xml">
  39. <link rel="alternate icon" href="/img/favicon.png" type="image/png">
  40. <link rel="mask-icon" href="/img/agit-safari.svg" color="#609926">
  41. <link rel="fluid-icon" href="/img/agit-lg.png" title="Agit">
  42. <link rel="stylesheet" href="/css/index.css?v=220846678a86246c9d7e7c46c21f20c2">
  43. <noscript>
  44. <style>
  45. .dropdown:hover > .menu { display: block; }
  46. .ui.secondary.menu .dropdown.item > .menu { margin-top: 0; }
  47. </style>
  48. </noscript>
  49. <style class="list-search-style"></style>
  50. <meta property="og:title" content="ygbhx" />
  51. <meta property="og:url" content="https://agit.ai/guot54/ygbhx" />
  52. <meta property="og:type" content="object" />
  53. <meta property="og:image" content="https://agit.ai/user/avatar/guot54/-1" />
  54. <meta property="og:site_name" content="Agit" />
  55. <link rel="stylesheet" href="/vendor/plugins/xterm/xterm.css?v=220846678a86246c9d7e7c46c21f20c2" />
  56. </head>
  57. <body>
  58. <div class="full height">
  59. <noscript>使用 JavaScript能使本网站更好的工作。</noscript>
  60. <div class="ui top secondary stackable main menu following bar light" style="background: #242628; height: 52px;">
  61. <div class="ui container z-max" id="navbar" v-cloak style="position:fixed;">
  62. <div class="i-flex i-align-center i-justify-between logo-img" style="margin-right:26px;height:52px;">
  63. <a href="/">
  64. <img class="share-nav-logo" src="/img/logo/nav-logo.svg">
  65. </a>
  66. <div class="ui basic icon button mobile-only" id="navbar-expand-toggle">
  67. <i class="sidebar icon"></i>
  68. </div>
  69. </div>
  70. <a class="item " href="/">首页</a>
  71. <a class="item " href="/issues">讨论区</a>
  72. <a class="item " href="/pulls">合并请求</a>
  73. <a class="mobile-only item " href="/explore/repos">探索</a>
  74. <div class="ui input d-relative navbar-search not-mobile" :class="{active:menuVisible}">
  75. <i class="icon iconfont icon-search"></i>
  76. <input v-model="searchName" placeholder="搜索" type="text" autocomplete="off" @focus="menuVisible = true">
  77. <div v-show="searchName.trim() && menuVisible" class="ui segment transition z-menu" @focus="menuVisible = true">
  78. <div class="ui list" @click="handleSearch('repos')">
  79. <span class="mr-md">${searchName}</span> <span class="i-text-right">仓库</span>
  80. </div>
  81. <div class="ui list" @click="handleSearch('users')">
  82. <span class="mr-md">${searchName}</span> <span class="i-text-right">用户</span>
  83. </div>
  84. <div class="ui list" @click="handleSearch('organizations')">
  85. <span class="mr-md">${searchName}</span> <span class="i-text-right">组织</span>
  86. </div>
  87. </div>
  88. </div>
  89. <div class="right stackable menu header-right">
  90. <div class="ui dropdown jump item poping up active visible">
  91. <i class="iconfont mr-3xs font-size-2xl" :class='{"icon-lang-zh2en":lan!=="en-US","icon-lang-en2zh":lan==="en-US"}'></i>
  92. <span id="footerLang" class="hidden">简体中文</span>
  93. <i class="caret down icon font-size-sm"></i>
  94. <div class="menu">
  95. <span lang="zh-CN" class="item active selected" onclick="handleLanguage(&#34;zh-CN&#34;)">简体中文</span>
  96. <span lang="en-US" class="item " onclick="handleLanguage(&#34;en-US&#34;)">English</span>
  97. </div>
  98. </div>
  99. <a href="/notifications" class="item poping up" data-content='通知' data-variation="tiny inverted">
  100. <span class="text d-relative">
  101. <i class="iconfont icon-bell mr-none font-size-lg"></i>
  102. <span class="sr-mobile-only">通知</span>
  103. </span>
  104. </a>
  105. <div class="ui dropdown jump item poping up" data-content="创建…" data-variation="tiny inverted">
  106. <span class="text">
  107. <i class="iconfont icon-plus mr-3xs"></i>
  108. <span class="sr-mobile-only">创建…</span>
  109. <i class="caret down icon font-size-sm not-mobile"></i>
  110. </span>
  111. <div class="menu left">
  112. <a class="item" href="/repo/create">
  113. <i class="iconfont icon-create-repo"></i> 创建仓库
  114. </a>
  115. <a class="item" href="/repo/migrate">
  116. <i class="iconfont icon-migrate-repo"></i> 迁移外部仓库
  117. </a>
  118. <a class="item" href="/org/create">
  119. <i class="iconfont icon-org-member"></i> 创建组织
  120. </a>
  121. </div>
  122. </div>
  123. <div class="ui dropdown jump item poping up" data-position="bottom right" tabindex="-1" data-content="个人中心" data-variation="tiny inverted">
  124. <span class="text">
  125. <img class="ui tiny avatar image mr-3xs" src="/user/avatar/guot54/-1">
  126. <span class="sr-only">个人中心</span>
  127. <span class="mobile-only">guot54</span>
  128. <i class="caret down icon font-size-sm not-mobile" tabindex="-1"></i>
  129. </span>
  130. <div class="menu user-menu" tabindex="-1">
  131. <div class="ui header">
  132. 已登录用户 <strong>guot54</strong>
  133. </div>
  134. <div class="divider"></div>
  135. <a class="item" href="/guot54">
  136. <i class="iconfont icon-user"></i>
  137. 个人主页
  138. </a>
  139. <a class="item" href="/user/settings/profile">
  140. <i class="iconfont icon-gear"></i>
  141. 账号管理
  142. </a>
  143. <a class="item" href="/user/settings/computing">
  144. <i class="iconfont icon-pkg-manage"></i>
  145. 资源管理
  146. </a>
  147. <div class="divider"></div>
  148. <a class="item link-action logout" href data-url="/user/logout" data-redirect="/" onclick="logoutMethod()">
  149. <i class="iconfont icon-quit"></i>
  150. 退出
  151. </a>
  152. </div>
  153. </div>
  154. </div>
  155. </div>
  156. </div>
  157. <div id="repoHome" class="repository file list ">
  158. <div class="header-wrapper">
  159. <div class="ui container">
  160. <div class="repo-header">
  161. <div class="ui huge breadcrumb repo-title">
  162. <div class="repo-header-icon">
  163. <svg viewBox="0 0 16 16" class="svg octicon-repo-forked" width="32" height="32" aria-hidden="true"><path fill-rule="evenodd" d="M5 3.25a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm0 2.122a2.25 2.25 0 10-1.5 0v.878A2.25 2.25 0 005.75 8.5h1.5v2.128a2.251 2.251 0 101.5 0V8.5h1.5a2.25 2.25 0 002.25-2.25v-.878a2.25 2.25 0 10-1.5 0v.878a.75.75 0 01-.75.75h-4.5A.75.75 0 015 6.25v-.878zm3.75 7.378a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm3-8.75a.75.75 0 100-1.5.75.75 0 000 1.5z"/></svg>
  164. </div>
  165. <a href="/guot54">guot54</a>
  166. <div class="divider"> / </div>
  167. <a href="/guot54/ygbhx">ygbhx</a>
  168. <i class="iconfont icon-ai"></i>
  169. <div class="fork-flag">派生自 <a href="/Yemaozhi123/yemao">Yemaozhi123/yemao</a></div>
  170. </div>
  171. <div class="repo-buttons">
  172. <form method="post" action="/guot54/ygbhx/action/unwatch?redirect_to=%2fguot54%2fygbhx%2fsrc%2fbranch%2fmaster%2flib%2fdrpy2.min.js">
  173. <input type="hidden" name="_csrf" value="-_9D8MG3pwscN4vzfUyrp2-pZpw6MTY5MzU3MTE2MzQ1NzgwNDcyOA">
  174. <div class="ui labeled button" tabindex="0">
  175. <button type="submit" class="ui compact basic button">
  176. <i class="iconfont mr-2xs icon-eye-slash"></i>取消关注
  177. </button>
  178. <a class="ui basic label" href="/guot54/ygbhx/watchers">
  179. 1
  180. </a>
  181. </div>
  182. </form>
  183. <form method="post" action="/guot54/ygbhx/action/star?redirect_to=%2fguot54%2fygbhx%2fsrc%2fbranch%2fmaster%2flib%2fdrpy2.min.js">
  184. <input type="hidden" name="_csrf" value="-_9D8MG3pwscN4vzfUyrp2-pZpw6MTY5MzU3MTE2MzQ1NzgwNDcyOA">
  185. <div class="ui labeled button" tabindex="0">
  186. <button type="submit" class="ui compact basic button">
  187. <i class="mr-2xs iconfont icon-star"></i>点赞
  188. </button>
  189. <a class="ui basic label" href="/guot54/ygbhx/stars">
  190. 0
  191. </a>
  192. </div>
  193. </form>
  194. <div class="ui labeled button " tabindex="0">
  195. <a class="ui compact basic button
  196. "
  197. href="/repo/fork/12294"
  198. data-position="top center" data-variation="tiny">
  199. <i class="mr-2xs iconfont icon-fork"></i>派生
  200. </a>
  201. <a class="ui basic label" href="/guot54/ygbhx/forks">
  202. 0
  203. </a>
  204. </div>
  205. </div>
  206. </div>
  207. </div>
  208. <div class="ui tabs container">
  209. <div class="ui tabular stackable menu navbar">
  210. <a class="active item" href="/guot54/ygbhx">
  211. <i class="iconfont icon-code"></i> 代码
  212. </a>
  213. <a class=" item" href="/guot54/ygbhx/issues">
  214. <i class="iconfont icon-open"></i> 讨论 <span class="ui gray tiny label circular">0</span>
  215. </a>
  216. <a class=" item" href="/guot54/ygbhx/pulls">
  217. <i class="iconfont icon-merge-request"></i> 合并请求 <span class="ui gray tiny label circular">0</span>
  218. </a>
  219. <a class=" item" href="/guot54/ygbhx/wiki" >
  220. <i class="iconfont icon-wiki"></i> 百科
  221. </a>
  222. <a class=" item" href="/guot54/ygbhx/activity">
  223. <i class="iconfont icon-activity"></i> 动态
  224. </a>
  225. <a class=" item" href="/guot54/ygbhx/training">
  226. <i class="iconfont icon-training"></i> 训练
  227. </a>
  228. <a class=" item" href="/guot54/ygbhx/storage">
  229. <i class="iconfont icon-save"></i> 存储
  230. </a>
  231. <div class="right menu">
  232. <a class=" item" href="/guot54/ygbhx/settings">
  233. <i class="iconfont icon-gear"></i> 仓库设置
  234. </a>
  235. </div>
  236. </div>
  237. </div>
  238. <div class="ui tabs divider"></div>
  239. </div>
  240. <span class="repo-url hidden">/guot54/ygbhx</span>
  241. <span class="repo-id hidden">12294</span>
  242. <div class="ui container">
  243. <div class="ui repo-description">
  244. <div id="repo-desc">
  245. <span class="no-description text-italic">暂无描述</span>
  246. <a class="link" href=""></a>
  247. </div>
  248. </div>
  249. <div class="ui" id="repo-topics">
  250. </div>
  251. <div class="ui repo-topic-edit grid form segment error" id="topic_edit" style="display:none">
  252. <div class="fourteen wide column">
  253. <div class="field">
  254. <div class="ui fluid multiple search selection dropdown">
  255. <input type="hidden" name="topics" value="">
  256. <div class="text"></div>
  257. </div>
  258. </div>
  259. </div>
  260. <div class="two wide column">
  261. <a class="ui button primary" href="javascript:;" id="save_topic"
  262. data-link="/guot54/ygbhx/topics">保存</a>
  263. </div>
  264. </div>
  265. <div class="hide" id="validate_prompt">
  266. <span id="count_prompt">您最多选择25个主题</span>
  267. <span id="format_prompt">主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符</span>
  268. </div>
  269. <div class="shareicon i-flex">
  270. <span onclick="handleShare()" class="cur-pointer ml-auto mr-sm">
  271. <i class="iconfont icon-share font-size-xs"></i>
  272. 匿名共享
  273. </span>
  274. </div>
  275. <div class="ui segments repository-summary shadow-0 is-lang-stats">
  276. <div class="ui segment sub-menu repository-menu">
  277. <div class="ui two horizontal center link list">
  278. <div class="item">
  279. <a class="ui" href="/guot54/ygbhx/commits/branch/master"><i class="iconfont icon-commit"></i> <b>598</b> 提交</a>
  280. </div>
  281. <div class="item">
  282. <a class="ui" href="/guot54/ygbhx/branches/"><i class="iconfont icon-branch-down"></i> <b>2</b> 分支</a>
  283. </div>
  284. <div class="item">
  285. <span class="ui"><i class="iconfont icon-memory"></i> <b id="RepoSize">28 MB</b></span>
  286. </div>
  287. </div>
  288. </div>
  289. <div class="ui segment sub-menu language-stats-details" style="display: none">
  290. <div class="ui horizontal center link list">
  291. <div class="item">
  292. <span class="ui">
  293. <i class="color-icon" style="background-color: #f1e05a"></i>
  294. <b>
  295. JavaScript
  296. </b> 66.8%</span>
  297. </div>
  298. <div class="item">
  299. <span class="ui">
  300. <i class="color-icon" style="background-color: #3572A5"></i>
  301. <b>
  302. Python
  303. </b> 33.2%</span>
  304. </div>
  305. </div>
  306. </div>
  307. <a class="ui segment language-stats">
  308. <div class="bar" style="width: 66.8%; background-color: #f1e05a">&nbsp;</div>
  309. <div class="bar" style="width: 33.2%; background-color: #3572A5">&nbsp;</div>
  310. </a>
  311. </div>
  312. <div class="ui stackable secondary menu mobile--margin-between-items mobile--no-negative-margins">
  313. <div class="fitted item choose reference">
  314. <div class="ui floating filter dropdown custom" data-can-create-branch="true" data-no-results="未找到结果">
  315. <div id="branchSelect" class="ui basic small compact button" data-mode="branches" @click="menuVisible = !menuVisible" @keyup.enter="menuVisible = !menuVisible">
  316. <span class="text">
  317. <i class="iconfont icon-branch-down"></i>
  318. 分支:
  319. <strong>master</strong>
  320. </span>
  321. <i class="dropdown icon"></i>
  322. </div>
  323. <div class="data" style="display: none" data-mode="branches">
  324. <div class="item branch selected" data-url="/guot54/ygbhx/src/branch/master/lib/drpy2.min.js">master</div>
  325. <div class="item branch " data-url="/guot54/ygbhx/src/branch/yemaozhi123-patch-1/lib/drpy2.min.js">yemaozhi123-patch-1</div>
  326. </div>
  327. <div class="menu transition" :class="{visible: menuVisible}" v-if="menuVisible" v-cloak>
  328. <div class="ui icon search input">
  329. <i class="filter icon"></i>
  330. <input name="search" ref="searchField" v-model="searchTerm" @keydown="keydown($event)" placeholder="过滤分支或标签...">
  331. </div>
  332. <div class="header branch-tag-choice">
  333. <div class="ui grid">
  334. <div class="two column row">
  335. <a class="reference column" href="#" @click="mode = 'branches'; focusSearchField()">
  336. <span class="text" :class="{black: mode !== 'branches'}">
  337. <i class="iconfont icon-branch-down"></i> 分支列表
  338. </span>
  339. </a>
  340. <a class="reference column" href="#" @click="mode = 'tags'; focusSearchField()">
  341. <span class="text" :class="{black: mode !== 'tags'}">
  342. <i class="reference tags icon"></i> 标签列表
  343. </span>
  344. </a>
  345. </div>
  346. </div>
  347. </div>
  348. <div class="scrolling menu" ref="scrollContainer">
  349. <div v-for="(item, index) in filteredItems" :key="item.name" class="item" :class="{selected: item.selected, active: active == index}" @click="selectItem(item)" :ref="'listItem' + index">${ item.name }</div>
  350. <div class="item" v-if="showCreateNewBranch" :class="{active: active == filteredItems.length}" :ref="'listItem' + filteredItems.length">
  351. <a href="#" @click="createNewBranch()">
  352. <div>
  353. <i class="iconfont icon-branch-down"></i>
  354. 创建分支 <strong>${ searchTerm }</strong>
  355. </div>
  356. <div class="text small">
  357. 从 &#39;master&#39;
  358. </div>
  359. </a>
  360. <form ref="newBranchForm" action="/guot54/ygbhx/branches/_new/branch/master" method="post">
  361. <input type="hidden" name="_csrf" value="-_9D8MG3pwscN4vzfUyrp2-pZpw6MTY5MzU3MTE2MzQ1NzgwNDcyOA">
  362. <input type="hidden" name="new_branch_name" v-model="searchTerm">
  363. </form>
  364. </div>
  365. </div>
  366. <div class="message" v-if="showNoResults">${ noResults }</div>
  367. </div>
  368. </div>
  369. </div>
  370. <div class="fitted item">
  371. <span class="ui breadcrumb repo-path">
  372. <a class="section" href="/guot54/ygbhx/src/branch/master" title="ygbhx">ygbhx</a>
  373. <span class="divider">/</span>
  374. <span class="section">
  375. <a href="/guot54/ygbhx/src/branch/master/lib" title="lib">lib</a></span>
  376. <span class="divider">/</span>
  377. <span class="active section" title="drpy2.min.js">drpy2.min.js</span>
  378. </span></div>
  379. <div class="right fitted item" id="file-buttons">
  380. <div>
  381. </div>
  382. </div>
  383. <div class="fitted item">
  384. </div>
  385. </div>
  386. <div class="tab-size-8 non-diff-file-content">
  387. <h4 class="file-header ui top attached header">
  388. <div class="file-header-left df ac">
  389. <div class="file-info text grey normal mono">
  390. <div class="file-info-entry">
  391. 1 行
  392. </div>
  393. <div class="file-info-entry">
  394. 39 KB
  395. </div>
  396. </div>
  397. </div>
  398. <div class="file-header-right df ac">
  399. <div class="ui right file-actions">
  400. <div class="ui buttons">
  401. <a class="ui button" href="/guot54/ygbhx/raw/branch/master/lib/drpy2.min.js">原始文件</a>
  402. <a class="ui button" href="/guot54/ygbhx/src/commit/8daf6a0a0251bfccc79764164f5666db267d5385/lib/drpy2.min.js">永久链接</a>
  403. <a class="ui button" href="/guot54/ygbhx/blame/branch/master/lib/drpy2.min.js">Blame</a>
  404. <a class="ui button" href="/guot54/ygbhx/commits/branch/master/lib/drpy2.min.js">文件历史</a>
  405. </div>
  406. <a href="/guot54/ygbhx/_edit/master/lib/drpy2.min.js"><span class="btn-octicon poping up" data-content="编辑文件" data-position="bottom center" data-variation="tiny inverted"><svg viewBox="0 0 16 16" class="svg octicon-pencil" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M11.013 1.427a1.75 1.75 0 012.474 0l1.086 1.086a1.75 1.75 0 010 2.474l-8.61 8.61c-.21.21-.47.364-.756.445l-3.251.93a.75.75 0 01-.927-.928l.929-3.25a1.75 1.75 0 01.445-.758l8.61-8.61zm1.414 1.06a.25.25 0 00-.354 0L10.811 3.75l1.439 1.44 1.263-1.263a.25.25 0 000-.354l-1.086-1.086zM11.189 6.25L9.75 4.81l-6.286 6.287a.25.25 0 00-.064.108l-.558 1.953 1.953-.558a.249.249 0 00.108-.064l6.286-6.286z"/></svg></span></a>
  407. <a href="/guot54/ygbhx/_delete/master/lib/drpy2.min.js"><span class="btn-octicon btn-octicon-danger poping up" data-content="删除文件" data-position="bottom center" data-variation="tiny inverted"><svg viewBox="0 0 16 16" class="svg octicon-trashcan" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M6.5 1.75a.25.25 0 01.25-.25h2.5a.25.25 0 01.25.25V3h-3V1.75zm4.5 0V3h2.25a.75.75 0 010 1.5H2.75a.75.75 0 010-1.5H5V1.75C5 .784 5.784 0 6.75 0h2.5C10.216 0 11 .784 11 1.75zM4.496 6.675a.75.75 0 10-1.492.15l.66 6.6A1.75 1.75 0 005.405 15h5.19c.9 0 1.652-.681 1.741-1.576l.66-6.6a.75.75 0 00-1.492-.149l-.66 6.6a.25.25 0 01-.249.225h-5.19a.25.25 0 01-.249-.225l-.66-6.6z"/></svg></span></a>
  408. </div>
  409. </div>
  410. </h4>
  411. <div class="ui attached table unstackable segment">
  412. <div class="file-view code-view">
  413. <table>
  414. <tbody>
  415. <tr>
  416. <td id="L1" class="lines-num">
  417. <span id="L1" data-line-number="1"></span>
  418. </td>
  419. <td rel="L1" class="lines-code chroma">
  420. <code><span class="kr">import</span> <span class="nx">cheerio</span> <span class="nx">from</span><span class="s2">&#34;assets://js/lib/cheerio.min.js&#34;</span><span class="p">;</span><span class="kr">import</span><span class="s2">&#34;assets://js/lib/crypto-js.js&#34;</span><span class="p">;</span><span class="kr">import</span> <span class="nx">模板</span> <span class="nx">from</span><span class="s2">&#34;./模板.js&#34;</span><span class="p">;</span><span class="kr">import</span><span class="p">{</span><span class="nx">gbkTool</span><span class="p">}</span><span class="nx">from</span><span class="s2">&#34;./gbk.js&#34;</span><span class="p">;</span><span class="kd">function</span> <span class="nx">init_test</span><span class="p">(</span><span class="p">)</span><span class="p">{</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="s2">&#34;init_test_start&#34;</span><span class="p">)</span><span class="p">;</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="s2">&#34;当前版本号:&#34;</span><span class="o">+</span><span class="nx">VERSION</span><span class="p">)</span><span class="p">;</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">RKEY</span><span class="p">)</span><span class="p">;</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span><span class="nx">rule</span><span class="p">)</span><span class="p">)</span><span class="p">;</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="s2">&#34;init_test_end&#34;</span><span class="p">)</span><span class="p">}</span><span class="kd">function</span> <span class="nx">pre</span><span class="p">(</span><span class="p">)</span><span class="p">{</span><span class="k">if</span><span class="p">(</span><span class="k">typeof</span> <span class="nx">rule</span><span class="p">.</span><span class="nx">预处理</span><span class="o">===</span><span class="s2">&#34;string&#34;</span><span class="o">&amp;&amp;</span><span class="nx">rule</span><span class="p">.</span><span class="nx">预处理</span><span class="o">&amp;&amp;</span><span class="nx">rule</span><span class="p">.</span><span class="nx">预处理</span><span class="p">.</span><span class="nx">trim</span><span class="p">(</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="kd">let</span> <span class="nx">code</span><span class="o">=</span><span class="nx">rule</span><span class="p">.</span><span class="nx">预处理</span><span class="p">.</span><span class="nx">trim</span><span class="p">(</span><span class="p">)</span><span class="p">;</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="s2">&#34;执行预处理代码:&#34;</span><span class="o">+</span><span class="nx">code</span><span class="p">)</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">code</span><span class="p">.</span><span class="nx">startsWith</span><span class="p">(</span><span class="s2">&#34;js:&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="nx">code</span><span class="o">=</span><span class="nx">code</span><span class="p">.</span><span class="nx">replace</span><span class="p">(</span><span class="s2">&#34;js:&#34;</span><span class="p">,</span><span class="s2">&#34;&#34;</span><span class="p">)</span><span class="p">}</span><span class="k">try</span><span class="p">{</span><span class="nb">eval</span><span class="p">(</span><span class="nx">code</span><span class="p">)</span><span class="p">}</span><span class="k">catch</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span><span class="p">{</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="s2">&#34;预处理执行失败:&#34;</span><span class="o">+</span><span class="nx">e</span><span class="p">.</span><span class="nx">message</span><span class="p">)</span><span class="p">}</span><span class="p">}</span><span class="p">}</span><span class="kd">let</span> <span class="nx">rule</span><span class="o">=</span><span class="p">{</span><span class="p">}</span><span class="p">;</span><span class="kd">let</span> <span class="nx">vercode</span><span class="o">=</span><span class="k">typeof</span> <span class="nx">pdfl</span><span class="o">===</span><span class="s2">&#34;function&#34;</span><span class="o">?</span><span class="s2">&#34;drpy2.1&#34;</span><span class="o">:</span><span class="s2">&#34;drpy2&#34;</span><span class="p">;</span><span class="kr">const</span> <span class="nx">VERSION</span><span class="o">=</span><span class="nx">vercode</span><span class="o">+</span><span class="s2">&#34; 3.9.43beta1 20230607&#34;</span><span class="p">;</span><span class="kr">const</span> <span class="nx">MOBILE_UA</span><span class="o">=</span><span class="s2">&#34;Mozilla/5.0 (Linux; Android 11; M2007J3SC Build/RKQ1.200826.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045714 Mobile Safari/537.36&#34;</span><span class="p">;</span><span class="kr">const</span> <span class="nx">PC_UA</span><span class="o">=</span><span class="s2">&#34;Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36&#34;</span><span class="p">;</span><span class="kr">const</span> <span class="nx">UA</span><span class="o">=</span><span class="s2">&#34;Mozilla/5.0&#34;</span><span class="p">;</span><span class="kr">const</span> <span class="nx">UC_UA</span><span class="o">=</span><span class="s2">&#34;Mozilla/5.0 (Linux; U; Android 9; zh-CN; MI 9 Build/PKQ1.181121.001) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.108 UCBrowser/12.5.5.1035 Mobile Safari/537.36&#34;</span><span class="p">;</span><span class="kr">const</span> <span class="nx">IOS_UA</span><span class="o">=</span><span class="s2">&#34;Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1&#34;</span><span class="p">;</span><span class="kr">const</span> <span class="nx">RULE_CK</span><span class="o">=</span><span class="s2">&#34;cookie&#34;</span><span class="p">;</span><span class="kr">const</span> <span class="nx">CATE_EXCLUDE</span><span class="o">=</span><span class="s2">&#34;首页|留言|APP|下载|资讯|新闻|动态&#34;</span><span class="p">;</span><span class="kr">const</span> <span class="nx">TAB_EXCLUDE</span><span class="o">=</span><span class="s2">&#34;猜你|喜欢|下载|剧情|热播&#34;</span><span class="p">;</span><span class="kr">const</span> <span class="nx">OCR_RETRY</span><span class="o">=</span><span class="mi">3</span><span class="p">;</span><span class="kr">const</span> <span class="nx">OCR_API</span><span class="o">=</span><span class="s2">&#34;http://drpy.nokia.press:8028/ocr/drpy/text&#34;</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="k">typeof</span> <span class="nx">MY_URL</span><span class="o">===</span><span class="s2">&#34;undefined&#34;</span><span class="p">)</span><span class="p">{</span><span class="kd">var</span> <span class="nx">MY_URL</span><span class="p">}</span><span class="kd">var</span> <span class="nx">HOST</span><span class="p">;</span><span class="kd">var</span> <span class="nx">RKEY</span><span class="p">;</span><span class="kd">var</span> <span class="nx">fetch</span><span class="p">;</span><span class="kd">var</span> <span class="nx">print</span><span class="p">;</span><span class="kd">var</span> <span class="nx">log</span><span class="p">;</span><span class="kd">var</span> <span class="nx">rule_fetch_params</span><span class="p">;</span><span class="kd">var</span> <span class="nx">fetch_params</span><span class="p">;</span><span class="kd">var</span> <span class="nx">oheaders</span><span class="p">;</span><span class="kd">var</span> <span class="nx">_pdfh</span><span class="p">;</span><span class="kd">var</span> <span class="nx">_pdfa</span><span class="p">;</span><span class="kd">var</span> <span class="nx">_pd</span><span class="p">;</span><span class="kr">const</span> <span class="nx">DOM_CHECK_ATTR</span><span class="o">=</span><span class="sr">/(url|src|href|-original|-src|-play|-url)$/</span><span class="p">;</span><span class="kr">const</span> <span class="nx">NOADD_INDEX</span><span class="o">=</span><span class="sr">/:eq|:lt|:gt|:first|:last|^body$|^#/</span><span class="p">;</span><span class="kr">const</span> <span class="nx">URLJOIN_ATTR</span><span class="o">=</span><span class="sr">/(url|src|href|-original|-src|-play|-url)$/</span><span class="p">;</span><span class="kr">const</span> <span class="nx">SELECT_REGEX</span><span class="o">=</span><span class="sr">/:eq|:lt|:gt|#/g</span><span class="p">;</span><span class="kr">const</span> <span class="nx">SELECT_REGEX_A</span><span class="o">=</span><span class="sr">/:eq|:lt|:gt/g</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="k">typeof</span> <span class="nb">Object</span><span class="p">.</span><span class="nx">assign</span><span class="o">!=</span><span class="s2">&#34;function&#34;</span><span class="p">)</span><span class="p">{</span><span class="nb">Object</span><span class="p">.</span><span class="nx">assign</span><span class="o">=</span><span class="kd">function</span><span class="p">(</span><span class="p">)</span><span class="p">{</span><span class="kd">var</span> <span class="nx">target</span><span class="o">=</span><span class="nx">arguments</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="p">;</span><span class="k">for</span><span class="p">(</span><span class="kd">var</span> <span class="nx">i</span><span class="o">=</span><span class="mi">1</span><span class="p">;</span><span class="nx">i</span><span class="o">&lt;</span><span class="nx">arguments</span><span class="p">.</span><span class="nx">length</span><span class="p">;</span><span class="nx">i</span><span class="o">++</span><span class="p">)</span><span class="p">{</span><span class="kd">var</span> <span class="nx">source</span><span class="o">=</span><span class="nx">arguments</span><span class="p">[</span><span class="nx">i</span><span class="p">]</span><span class="p">;</span><span class="k">for</span><span class="p">(</span><span class="kd">var</span> <span class="nx">key</span> <span class="k">in</span> <span class="nx">source</span><span class="p">)</span><span class="p">{</span><span class="k">if</span><span class="p">(</span><span class="nb">Object</span><span class="p">.</span><span class="nx">prototype</span><span class="p">.</span><span class="nx">hasOwnProperty</span><span class="p">.</span><span class="nx">call</span><span class="p">(</span><span class="nx">source</span><span class="p">,</span><span class="nx">key</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="nx">target</span><span class="p">[</span><span class="nx">key</span><span class="p">]</span><span class="o">=</span><span class="nx">source</span><span class="p">[</span><span class="nx">key</span><span class="p">]</span><span class="p">}</span><span class="p">}</span><span class="p">}</span><span class="k">return</span> <span class="nx">target</span><span class="p">}</span><span class="p">}</span><span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="nb">String</span><span class="p">.</span><span class="nx">prototype</span><span class="p">.</span><span class="nx">includes</span><span class="p">)</span><span class="p">{</span><span class="nb">String</span><span class="p">.</span><span class="nx">prototype</span><span class="p">.</span><span class="nx">includes</span><span class="o">=</span><span class="kd">function</span><span class="p">(</span><span class="nx">search</span><span class="p">,</span><span class="nx">start</span><span class="p">)</span><span class="p">{</span><span class="k">if</span><span class="p">(</span><span class="k">typeof</span> <span class="nx">start</span><span class="o">!==</span><span class="s2">&#34;number&#34;</span><span class="p">)</span><span class="p">{</span><span class="nx">start</span><span class="o">=</span><span class="mi">0</span><span class="p">}</span><span class="k">if</span><span class="p">(</span><span class="nx">start</span><span class="o">+</span><span class="nx">search</span><span class="p">.</span><span class="nx">length</span><span class="o">&gt;</span><span class="k">this</span><span class="p">.</span><span class="nx">length</span><span class="p">)</span><span class="p">{</span><span class="k">return</span> <span class="kc">false</span><span class="p">}</span><span class="k">else</span><span class="p">{</span><span class="k">return</span> <span class="k">this</span><span class="p">.</span><span class="nx">indexOf</span><span class="p">(</span><span class="nx">search</span><span class="p">,</span><span class="nx">start</span><span class="p">)</span><span class="o">!==</span><span class="o">-</span><span class="mi">1</span><span class="p">}</span><span class="p">}</span><span class="p">}</span><span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="nb">Array</span><span class="p">.</span><span class="nx">prototype</span><span class="p">.</span><span class="nx">includes</span><span class="p">)</span><span class="p">{</span><span class="nb">Object</span><span class="p">.</span><span class="nx">defineProperty</span><span class="p">(</span><span class="nb">Array</span><span class="p">.</span><span class="nx">prototype</span><span class="p">,</span><span class="s2">&#34;includes&#34;</span><span class="p">,</span><span class="p">{</span><span class="nx">value</span><span class="o">:</span><span class="kd">function</span><span class="p">(</span><span class="nx">searchElement</span><span class="p">,</span><span class="nx">fromIndex</span><span class="p">)</span><span class="p">{</span><span class="k">if</span><span class="p">(</span><span class="k">this</span><span class="o">==</span><span class="kc">null</span><span class="p">)</span><span class="p">{</span><span class="k">throw</span> <span class="k">new</span> <span class="nx">TypeError</span><span class="p">(</span><span class="s1">&#39;&#34;this&#34; is null or not defined&#39;</span><span class="p">)</span><span class="p">}</span><span class="kd">var</span> <span class="nx">o</span><span class="o">=</span><span class="nb">Object</span><span class="p">(</span><span class="k">this</span><span class="p">)</span><span class="p">;</span><span class="kd">var</span> <span class="nx">len</span><span class="o">=</span><span class="nx">o</span><span class="p">.</span><span class="nx">length</span><span class="o">&gt;&gt;&gt;</span><span class="mi">0</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">len</span><span class="o">===</span><span class="mi">0</span><span class="p">)</span><span class="p">{</span><span class="k">return</span> <span class="kc">false</span><span class="p">}</span><span class="kd">var</span> <span class="nx">n</span><span class="o">=</span><span class="nx">fromIndex</span><span class="o">|</span><span class="mi">0</span><span class="p">;</span><span class="kd">var</span> <span class="nx">k</span><span class="o">=</span><span class="nb">Math</span><span class="p">.</span><span class="nx">max</span><span class="p">(</span><span class="nx">n</span><span class="o">&gt;=</span><span class="mi">0</span><span class="o">?</span><span class="nx">n</span><span class="o">:</span><span class="nx">len</span><span class="o">-</span><span class="nb">Math</span><span class="p">.</span><span class="nx">abs</span><span class="p">(</span><span class="nx">n</span><span class="p">)</span><span class="p">,</span><span class="mi">0</span><span class="p">)</span><span class="p">;</span><span class="k">while</span><span class="p">(</span><span class="nx">k</span><span class="o">&lt;</span><span class="nx">len</span><span class="p">)</span><span class="p">{</span><span class="k">if</span><span class="p">(</span><span class="nx">o</span><span class="p">[</span><span class="nx">k</span><span class="p">]</span><span class="o">===</span><span class="nx">searchElement</span><span class="p">)</span><span class="p">{</span><span class="k">return</span> <span class="kc">true</span><span class="p">}</span><span class="nx">k</span><span class="o">++</span><span class="p">}</span><span class="k">return</span> <span class="kc">false</span><span class="p">}</span><span class="p">}</span><span class="p">)</span><span class="p">}</span><span class="k">if</span><span class="p">(</span><span class="k">typeof</span> <span class="nb">String</span><span class="p">.</span><span class="nx">prototype</span><span class="p">.</span><span class="nx">startsWith</span><span class="o">!=</span><span class="s2">&#34;function&#34;</span><span class="p">)</span><span class="p">{</span><span class="nb">String</span><span class="p">.</span><span class="nx">prototype</span><span class="p">.</span><span class="nx">startsWith</span><span class="o">=</span><span class="kd">function</span><span class="p">(</span><span class="nx">prefix</span><span class="p">)</span><span class="p">{</span><span class="k">return</span> <span class="k">this</span><span class="p">.</span><span class="nx">slice</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="nx">prefix</span><span class="p">.</span><span class="nx">length</span><span class="p">)</span><span class="o">===</span><span class="nx">prefix</span><span class="p">}</span><span class="p">}</span><span class="k">if</span><span class="p">(</span><span class="k">typeof</span> <span class="nb">String</span><span class="p">.</span><span class="nx">prototype</span><span class="p">.</span><span class="nx">endsWith</span><span class="o">!=</span><span class="s2">&#34;function&#34;</span><span class="p">)</span><span class="p">{</span><span class="nb">String</span><span class="p">.</span><span class="nx">prototype</span><span class="p">.</span><span class="nx">endsWith</span><span class="o">=</span><span class="kd">function</span><span class="p">(</span><span class="nx">suffix</span><span class="p">)</span><span class="p">{</span><span class="k">return</span> <span class="k">this</span><span class="p">.</span><span class="nx">indexOf</span><span class="p">(</span><span class="nx">suffix</span><span class="p">,</span><span class="k">this</span><span class="p">.</span><span class="nx">length</span><span class="o">-</span><span class="nx">suffix</span><span class="p">.</span><span class="nx">length</span><span class="p">)</span><span class="o">!==</span><span class="o">-</span><span class="mi">1</span><span class="p">}</span><span class="p">}</span><span class="nb">Object</span><span class="p">.</span><span class="nx">prototype</span><span class="p">.</span><span class="nx">myValues</span><span class="o">=</span><span class="kd">function</span><span class="p">(</span><span class="nx">obj</span><span class="p">)</span><span class="p">{</span><span class="k">if</span><span class="p">(</span><span class="nx">obj</span><span class="o">==</span><span class="kc">null</span><span class="p">)</span><span class="p">{</span><span class="k">throw</span> <span class="k">new</span> <span class="nx">TypeError</span><span class="p">(</span><span class="s2">&#34;Cannot convert undefined or null to object&#34;</span><span class="p">)</span><span class="p">}</span><span class="kd">var</span> <span class="nx">res</span><span class="o">=</span><span class="p">[</span><span class="p">]</span><span class="p">;</span><span class="k">for</span><span class="p">(</span><span class="kd">var</span> <span class="nx">k</span> <span class="k">in</span> <span class="nx">obj</span><span class="p">)</span><span class="p">{</span><span class="k">if</span><span class="p">(</span><span class="nx">obj</span><span class="p">.</span><span class="nx">hasOwnProperty</span><span class="p">(</span><span class="nx">k</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="nx">res</span><span class="p">.</span><span class="nx">push</span><span class="p">(</span><span class="nx">obj</span><span class="p">[</span><span class="nx">k</span><span class="p">]</span><span class="p">)</span><span class="p">}</span><span class="p">}</span><span class="k">return</span> <span class="nx">res</span><span class="p">}</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="k">typeof</span> <span class="nb">Object</span><span class="p">.</span><span class="nx">prototype</span><span class="p">.</span><span class="nx">values</span><span class="o">!=</span><span class="s2">&#34;function&#34;</span><span class="p">)</span><span class="p">{</span><span class="nb">Object</span><span class="p">.</span><span class="nx">prototype</span><span class="p">.</span><span class="nx">values</span><span class="o">=</span><span class="kd">function</span><span class="p">(</span><span class="nx">obj</span><span class="p">)</span><span class="p">{</span><span class="k">if</span><span class="p">(</span><span class="nx">obj</span><span class="o">==</span><span class="kc">null</span><span class="p">)</span><span class="p">{</span><span class="k">throw</span> <span class="k">new</span> <span class="nx">TypeError</span><span class="p">(</span><span class="s2">&#34;Cannot convert undefined or null to object&#34;</span><span class="p">)</span><span class="p">}</span><span class="kd">var</span> <span class="nx">res</span><span class="o">=</span><span class="p">[</span><span class="p">]</span><span class="p">;</span><span class="k">for</span><span class="p">(</span><span class="kd">var</span> <span class="nx">k</span> <span class="k">in</span> <span class="nx">obj</span><span class="p">)</span><span class="p">{</span><span class="k">if</span><span class="p">(</span><span class="nx">obj</span><span class="p">.</span><span class="nx">hasOwnProperty</span><span class="p">(</span><span class="nx">k</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="nx">res</span><span class="p">.</span><span class="nx">push</span><span class="p">(</span><span class="nx">obj</span><span class="p">[</span><span class="nx">k</span><span class="p">]</span><span class="p">)</span><span class="p">}</span><span class="p">}</span><span class="k">return</span> <span class="nx">res</span><span class="p">}</span><span class="p">}</span><span class="k">if</span><span class="p">(</span><span class="k">typeof</span> <span class="nb">Array</span><span class="p">.</span><span class="nx">prototype</span><span class="p">.</span><span class="nx">join</span><span class="o">!=</span><span class="s2">&#34;function&#34;</span><span class="p">)</span><span class="p">{</span><span class="nb">Array</span><span class="p">.</span><span class="nx">prototype</span><span class="p">.</span><span class="nx">join</span><span class="o">=</span><span class="kd">function</span><span class="p">(</span><span class="nx">emoji</span><span class="p">)</span><span class="p">{</span><span class="nx">emoji</span><span class="o">=</span><span class="nx">emoji</span><span class="o">||</span><span class="s2">&#34;&#34;</span><span class="p">;</span><span class="kd">let</span> <span class="nx">self</span><span class="o">=</span><span class="k">this</span><span class="p">;</span><span class="kd">let</span> <span class="nx">str</span><span class="o">=</span><span class="s2">&#34;&#34;</span><span class="p">;</span><span class="kd">let</span> <span class="nx">i</span><span class="o">=</span><span class="mi">0</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="nb">Array</span><span class="p">.</span><span class="nx">isArray</span><span class="p">(</span><span class="nx">self</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="k">throw</span> <span class="nb">String</span><span class="p">(</span><span class="nx">self</span><span class="p">)</span><span class="o">+</span><span class="s2">&#34;is not Array&#34;</span><span class="p">}</span><span class="k">if</span><span class="p">(</span><span class="nx">self</span><span class="p">.</span><span class="nx">length</span><span class="o">===</span><span class="mi">0</span><span class="p">)</span><span class="p">{</span><span class="k">return</span><span class="s2">&#34;&#34;</span><span class="p">}</span><span class="k">if</span><span class="p">(</span><span class="nx">self</span><span class="p">.</span><span class="nx">length</span><span class="o">===</span><span class="mi">1</span><span class="p">)</span><span class="p">{</span><span class="k">return</span> <span class="nb">String</span><span class="p">(</span><span class="nx">self</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="p">)</span><span class="p">}</span><span class="nx">i</span><span class="o">=</span><span class="mi">1</span><span class="p">;</span><span class="nx">str</span><span class="o">=</span><span class="k">this</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="p">;</span><span class="k">for</span><span class="p">(</span><span class="p">;</span><span class="nx">i</span><span class="o">&lt;</span><span class="nx">self</span><span class="p">.</span><span class="nx">length</span><span class="p">;</span><span class="nx">i</span><span class="o">++</span><span class="p">)</span><span class="p">{</span><span class="nx">str</span><span class="o">+=</span><span class="nb">String</span><span class="p">(</span><span class="nx">emoji</span><span class="p">)</span><span class="o">+</span><span class="nb">String</span><span class="p">(</span><span class="nx">self</span><span class="p">[</span><span class="nx">i</span><span class="p">]</span><span class="p">)</span><span class="p">}</span><span class="k">return</span> <span class="nx">str</span><span class="p">}</span><span class="p">}</span><span class="nb">String</span><span class="p">.</span><span class="nx">prototype</span><span class="p">.</span><span class="nx">rstrip</span><span class="o">=</span><span class="kd">function</span><span class="p">(</span><span class="nx">chars</span><span class="p">)</span><span class="p">{</span><span class="kd">let</span> <span class="nx">regex</span><span class="o">=</span><span class="k">new</span> <span class="nb">RegExp</span><span class="p">(</span><span class="nx">chars</span><span class="o">+</span><span class="s2">&#34;$&#34;</span><span class="p">)</span><span class="p">;</span><span class="k">return</span> <span class="k">this</span><span class="p">.</span><span class="nx">replace</span><span class="p">(</span><span class="nx">regex</span><span class="p">,</span><span class="s2">&#34;&#34;</span><span class="p">)</span><span class="p">}</span><span class="p">;</span><span class="nb">Array</span><span class="p">.</span><span class="nx">prototype</span><span class="p">.</span><span class="nx">append</span><span class="o">=</span><span class="nb">Array</span><span class="p">.</span><span class="nx">prototype</span><span class="p">.</span><span class="nx">push</span><span class="p">;</span><span class="nb">String</span><span class="p">.</span><span class="nx">prototype</span><span class="p">.</span><span class="nx">strip</span><span class="o">=</span><span class="nb">String</span><span class="p">.</span><span class="nx">prototype</span><span class="p">.</span><span class="nx">trim</span><span class="p">;</span><span class="kd">function</span> <span class="nx">是否正版</span><span class="p">(</span><span class="nx">vipUrl</span><span class="p">)</span><span class="p">{</span><span class="kd">let</span> <span class="nx">flag</span><span class="o">=</span><span class="k">new</span> <span class="nb">RegExp</span><span class="p">(</span><span class="s2">&#34;qq.com|iqiyi.com|youku.com|mgtv.com|bilibili.com|sohu.com|ixigua.com|pptv.com|miguvideo.com|le.com|1905.com|fun.tv&#34;</span><span class="p">)</span><span class="p">;</span><span class="k">return</span> <span class="nx">flag</span><span class="p">.</span><span class="nx">test</span><span class="p">(</span><span class="nx">vipUrl</span><span class="p">)</span><span class="p">}</span><span class="kd">function</span> <span class="nx">urlDeal</span><span class="p">(</span><span class="nx">vipUrl</span><span class="p">)</span><span class="p">{</span><span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="nx">vipUrl</span><span class="p">)</span><span class="p">{</span><span class="k">return</span><span class="s2">&#34;&#34;</span><span class="p">}</span><span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="nx">是否正版</span><span class="p">(</span><span class="nx">vipUrl</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="k">return</span> <span class="nx">vipUrl</span><span class="p">}</span><span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="sr">/miguvideo/</span><span class="p">.</span><span class="nx">test</span><span class="p">(</span><span class="nx">vipUrl</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="nx">vipUrl</span><span class="o">=</span><span class="nx">vipUrl</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span><span class="s2">&#34;#&#34;</span><span class="p">)</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span><span class="s2">&#34;?&#34;</span><span class="p">)</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="p">}</span><span class="k">return</span> <span class="nx">vipUrl</span><span class="p">}</span><span class="kd">function</span> <span class="nx">setResult</span><span class="p">(</span><span class="nx">d</span><span class="p">)</span><span class="p">{</span><span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="nb">Array</span><span class="p">.</span><span class="nx">isArray</span><span class="p">(</span><span class="nx">d</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="k">return</span><span class="p">[</span><span class="p">]</span><span class="p">}</span><span class="nx">VODS</span><span class="o">=</span><span class="p">[</span><span class="p">]</span><span class="p">;</span><span class="nx">d</span><span class="p">.</span><span class="nx">forEach</span><span class="p">(</span><span class="kd">function</span><span class="p">(</span><span class="nx">it</span><span class="p">)</span><span class="p">{</span><span class="kd">let</span> <span class="nx">obj</span><span class="o">=</span><span class="p">{</span><span class="nx">vod_id</span><span class="o">:</span><span class="nx">it</span><span class="p">.</span><span class="nx">url</span><span class="o">||</span><span class="s2">&#34;&#34;</span><span class="p">,</span><span class="nx">vod_name</span><span class="o">:</span><span class="nx">it</span><span class="p">.</span><span class="nx">title</span><span class="o">||</span><span class="s2">&#34;&#34;</span><span class="p">,</span><span class="nx">vod_remarks</span><span class="o">:</span><span class="nx">it</span><span class="p">.</span><span class="nx">desc</span><span class="o">||</span><span class="s2">&#34;&#34;</span><span class="p">,</span><span class="nx">vod_content</span><span class="o">:</span><span class="nx">it</span><span class="p">.</span><span class="nx">content</span><span class="o">||</span><span class="s2">&#34;&#34;</span><span class="p">,</span><span class="nx">vod_pic</span><span class="o">:</span><span class="nx">it</span><span class="p">.</span><span class="nx">pic_url</span><span class="o">||</span><span class="nx">it</span><span class="p">.</span><span class="nx">img</span><span class="o">||</span><span class="s2">&#34;&#34;</span><span class="p">}</span><span class="p">;</span><span class="kd">let</span> <span class="nx">keys</span><span class="o">=</span><span class="nb">Object</span><span class="p">.</span><span class="nx">keys</span><span class="p">(</span><span class="nx">it</span><span class="p">)</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">keys</span><span class="p">.</span><span class="nx">includes</span><span class="p">(</span><span class="s2">&#34;tname&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="nx">obj</span><span class="p">.</span><span class="nx">type_name</span><span class="o">=</span><span class="nx">it</span><span class="p">.</span><span class="nx">tname</span><span class="o">||</span><span class="s2">&#34;&#34;</span><span class="p">}</span><span class="k">if</span><span class="p">(</span><span class="nx">keys</span><span class="p">.</span><span class="nx">includes</span><span class="p">(</span><span class="s2">&#34;tid&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="nx">obj</span><span class="p">.</span><span class="nx">type_id</span><span class="o">=</span><span class="nx">it</span><span class="p">.</span><span class="nx">tid</span><span class="o">||</span><span class="s2">&#34;&#34;</span><span class="p">}</span><span class="k">if</span><span class="p">(</span><span class="nx">keys</span><span class="p">.</span><span class="nx">includes</span><span class="p">(</span><span class="s2">&#34;year&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="nx">obj</span><span class="p">.</span><span class="nx">vod_year</span><span class="o">=</span><span class="nx">it</span><span class="p">.</span><span class="nx">year</span><span class="o">||</span><span class="s2">&#34;&#34;</span><span class="p">}</span><span class="k">if</span><span class="p">(</span><span class="nx">keys</span><span class="p">.</span><span class="nx">includes</span><span class="p">(</span><span class="s2">&#34;actor&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="nx">obj</span><span class="p">.</span><span class="nx">vod_actor</span><span class="o">=</span><span class="nx">it</span><span class="p">.</span><span class="nx">actor</span><span class="o">||</span><span class="s2">&#34;&#34;</span><span class="p">}</span><span class="k">if</span><span class="p">(</span><span class="nx">keys</span><span class="p">.</span><span class="nx">includes</span><span class="p">(</span><span class="s2">&#34;director&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="nx">obj</span><span class="p">.</span><span class="nx">vod_director</span><span class="o">=</span><span class="nx">it</span><span class="p">.</span><span class="nx">director</span><span class="o">||</span><span class="s2">&#34;&#34;</span><span class="p">}</span><span class="k">if</span><span class="p">(</span><span class="nx">keys</span><span class="p">.</span><span class="nx">includes</span><span class="p">(</span><span class="s2">&#34;area&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="nx">obj</span><span class="p">.</span><span class="nx">vod_area</span><span class="o">=</span><span class="nx">it</span><span class="p">.</span><span class="nx">area</span><span class="o">||</span><span class="s2">&#34;&#34;</span><span class="p">}</span><span class="nx">VODS</span><span class="p">.</span><span class="nx">push</span><span class="p">(</span><span class="nx">obj</span><span class="p">)</span><span class="p">}</span><span class="p">)</span><span class="p">;</span><span class="k">return</span> <span class="nx">VODS</span><span class="p">}</span><span class="kd">function</span> <span class="nx">setResult2</span><span class="p">(</span><span class="nx">res</span><span class="p">)</span><span class="p">{</span><span class="nx">VODS</span><span class="o">=</span><span class="nx">res</span><span class="p">.</span><span class="nx">list</span><span class="o">||</span><span class="p">[</span><span class="p">]</span><span class="p">;</span><span class="k">return</span> <span class="nx">VODS</span><span class="p">}</span><span class="kd">function</span> <span class="nx">setHomeResult</span><span class="p">(</span><span class="nx">res</span><span class="p">)</span><span class="p">{</span><span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="nx">res</span><span class="o">||</span><span class="k">typeof</span> <span class="nx">res</span><span class="o">!==</span><span class="s2">&#34;object&#34;</span><span class="p">)</span><span class="p">{</span><span class="k">return</span><span class="p">[</span><span class="p">]</span><span class="p">}</span><span class="k">return</span> <span class="nx">setResult</span><span class="p">(</span><span class="nx">res</span><span class="p">.</span><span class="nx">list</span><span class="p">)</span><span class="p">}</span><span class="kd">function</span> <span class="nx">rc</span><span class="p">(</span><span class="nx">js</span><span class="p">)</span><span class="p">{</span><span class="k">if</span><span class="p">(</span><span class="nx">js</span><span class="o">===</span><span class="s2">&#34;maomi_aes.js&#34;</span><span class="p">)</span><span class="p">{</span><span class="kd">var</span> <span class="nx">a</span><span class="o">=</span><span class="nx">CryptoJS</span><span class="p">.</span><span class="nx">enc</span><span class="p">.</span><span class="nx">Utf8</span><span class="p">.</span><span class="nx">parse</span><span class="p">(</span><span class="s2">&#34;625222f9149e961d&#34;</span><span class="p">)</span><span class="p">;</span><span class="kd">var</span> <span class="nx">t</span><span class="o">=</span><span class="nx">CryptoJS</span><span class="p">.</span><span class="nx">enc</span><span class="p">.</span><span class="nx">Utf8</span><span class="p">.</span><span class="nx">parse</span><span class="p">(</span><span class="s2">&#34;5efdtf6060e2o330&#34;</span><span class="p">)</span><span class="p">;</span><span class="k">return</span><span class="p">{</span><span class="nx">De</span><span class="o">:</span><span class="kd">function</span><span class="p">(</span><span class="nx">word</span><span class="p">)</span><span class="p">{</span><span class="nx">word</span><span class="o">=</span><span class="nx">CryptoJS</span><span class="p">.</span><span class="nx">enc</span><span class="p">.</span><span class="nx">Hex</span><span class="p">.</span><span class="nx">parse</span><span class="p">(</span><span class="nx">word</span><span class="p">)</span><span class="p">;</span><span class="k">return</span> <span class="nx">CryptoJS</span><span class="p">.</span><span class="nx">AES</span><span class="p">.</span><span class="nx">decrypt</span><span class="p">(</span><span class="nx">CryptoJS</span><span class="p">.</span><span class="nx">enc</span><span class="p">.</span><span class="nx">Base64</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span><span class="nx">word</span><span class="p">)</span><span class="p">,</span><span class="nx">a</span><span class="p">,</span><span class="p">{</span><span class="nx">iv</span><span class="o">:</span><span class="nx">t</span><span class="p">,</span><span class="nx">mode</span><span class="o">:</span><span class="nx">CryptoJS</span><span class="p">.</span><span class="nx">mode</span><span class="p">.</span><span class="nx">CBC</span><span class="p">,</span><span class="nx">padding</span><span class="o">:</span><span class="nx">CryptoJS</span><span class="p">.</span><span class="nx">pad</span><span class="p">.</span><span class="nx">Pkcs7</span><span class="p">}</span><span class="p">)</span><span class="p">.</span><span class="nx">toString</span><span class="p">(</span><span class="nx">CryptoJS</span><span class="p">.</span><span class="nx">enc</span><span class="p">.</span><span class="nx">Utf8</span><span class="p">)</span><span class="p">}</span><span class="p">,</span><span class="nx">En</span><span class="o">:</span><span class="kd">function</span><span class="p">(</span><span class="nx">word</span><span class="p">)</span><span class="p">{</span><span class="kd">var</span> <span class="nx">Encrypted</span><span class="o">=</span><span class="nx">CryptoJS</span><span class="p">.</span><span class="nx">AES</span><span class="p">.</span><span class="nx">encrypt</span><span class="p">(</span><span class="nx">word</span><span class="p">,</span><span class="nx">a</span><span class="p">,</span><span class="p">{</span><span class="nx">iv</span><span class="o">:</span><span class="nx">t</span><span class="p">,</span><span class="nx">mode</span><span class="o">:</span><span class="nx">CryptoJS</span><span class="p">.</span><span class="nx">mode</span><span class="p">.</span><span class="nx">CBC</span><span class="p">,</span><span class="nx">padding</span><span class="o">:</span><span class="nx">CryptoJS</span><span class="p">.</span><span class="nx">pad</span><span class="p">.</span><span class="nx">Pkcs7</span><span class="p">}</span><span class="p">)</span><span class="p">;</span><span class="k">return</span> <span class="nx">Encrypted</span><span class="p">.</span><span class="nx">ciphertext</span><span class="p">.</span><span class="nx">toString</span><span class="p">(</span><span class="p">)</span><span class="p">}</span><span class="p">}</span><span class="p">}</span><span class="k">return</span><span class="p">{</span><span class="p">}</span><span class="p">}</span><span class="kd">function</span> <span class="nx">maoss</span><span class="p">(</span><span class="nx">jxurl</span><span class="p">,</span><span class="nx">ref</span><span class="p">,</span><span class="nx">key</span><span class="p">)</span><span class="p">{</span><span class="nx">fetch_params</span><span class="o">=</span><span class="nx">JSON</span><span class="p">.</span><span class="nx">parse</span><span class="p">(</span><span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span><span class="nx">rule_fetch_params</span><span class="p">)</span><span class="p">)</span><span class="p">;</span><span class="nb">eval</span><span class="p">(</span><span class="nx">getCryptoJS</span><span class="p">(</span><span class="p">)</span><span class="p">)</span><span class="p">;</span><span class="k">try</span><span class="p">{</span><span class="kd">var</span> <span class="nx">getVideoInfo</span><span class="o">=</span><span class="kd">function</span><span class="p">(</span><span class="nx">text</span><span class="p">)</span><span class="p">{</span><span class="k">return</span> <span class="nx">CryptoJS</span><span class="p">.</span><span class="nx">AES</span><span class="p">.</span><span class="nx">decrypt</span><span class="p">(</span><span class="nx">text</span><span class="p">,</span><span class="nx">key</span><span class="p">,</span><span class="p">{</span><span class="nx">iv</span><span class="o">:</span><span class="nx">iv</span><span class="p">,</span><span class="nx">padding</span><span class="o">:</span><span class="nx">CryptoJS</span><span class="p">.</span><span class="nx">pad</span><span class="p">.</span><span class="nx">Pkcs7</span><span class="p">}</span><span class="p">)</span><span class="p">.</span><span class="nx">toString</span><span class="p">(</span><span class="nx">CryptoJS</span><span class="p">.</span><span class="nx">enc</span><span class="p">.</span><span class="nx">Utf8</span><span class="p">)</span><span class="p">}</span><span class="p">;</span><span class="kd">var</span> <span class="nx">token_key</span><span class="o">=</span><span class="nx">key</span><span class="o">==</span><span class="kc">undefined</span><span class="o">?</span><span class="s2">&#34;dvyYRQlnPRCMdQSe&#34;</span><span class="o">:</span><span class="nx">key</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">ref</span><span class="p">)</span><span class="p">{</span><span class="kd">var</span> <span class="nx">html</span><span class="o">=</span><span class="nx">request</span><span class="p">(</span><span class="nx">jxurl</span><span class="p">,</span><span class="p">{</span><span class="nx">headers</span><span class="o">:</span><span class="p">{</span><span class="nx">Referer</span><span class="o">:</span><span class="nx">ref</span><span class="p">}</span><span class="p">}</span><span class="p">)</span><span class="p">}</span><span class="k">else</span><span class="p">{</span><span class="kd">var</span> <span class="nx">html</span><span class="o">=</span><span class="nx">request</span><span class="p">(</span><span class="nx">jxurl</span><span class="p">)</span><span class="p">}</span><span class="k">if</span><span class="p">(</span><span class="nx">html</span><span class="p">.</span><span class="nx">indexOf</span><span class="p">(</span><span class="s2">&#34;&amp;btwaf=&#34;</span><span class="p">)</span><span class="o">!=</span><span class="o">-</span><span class="mi">1</span><span class="p">)</span><span class="p">{</span><span class="nx">html</span><span class="o">=</span><span class="nx">request</span><span class="p">(</span><span class="nx">jxurl</span><span class="o">+</span><span class="s2">&#34;&amp;btwaf&#34;</span><span class="o">+</span><span class="nx">html</span><span class="p">.</span><span class="nx">match</span><span class="p">(</span><span class="sr">/&amp;btwaf(.*?)&#34;/</span><span class="p">)</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="p">,</span><span class="p">{</span><span class="nx">headers</span><span class="o">:</span><span class="p">{</span><span class="nx">Referer</span><span class="o">:</span><span class="nx">ref</span><span class="p">}</span><span class="p">}</span><span class="p">)</span><span class="p">}</span><span class="kd">var</span> <span class="nx">token_iv</span><span class="o">=</span><span class="nx">html</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span><span class="s1">&#39;_token = &#34;&#39;</span><span class="p">)</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span><span class="s1">&#39;&#34;&#39;</span><span class="p">)</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="p">;</span><span class="kd">var</span> <span class="nx">key</span><span class="o">=</span><span class="nx">CryptoJS</span><span class="p">.</span><span class="nx">enc</span><span class="p">.</span><span class="nx">Utf8</span><span class="p">.</span><span class="nx">parse</span><span class="p">(</span><span class="nx">token_key</span><span class="p">)</span><span class="p">;</span><span class="kd">var</span> <span class="nx">iv</span><span class="o">=</span><span class="nx">CryptoJS</span><span class="p">.</span><span class="nx">enc</span><span class="p">.</span><span class="nx">Utf8</span><span class="p">.</span><span class="nx">parse</span><span class="p">(</span><span class="nx">token_iv</span><span class="p">)</span><span class="p">;</span><span class="nb">eval</span><span class="p">(</span><span class="nx">html</span><span class="p">.</span><span class="nx">match</span><span class="p">(</span><span class="sr">/var config = {[\s\S]*?}/</span><span class="p">)</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">+</span><span class="s2">&#34;&#34;</span><span class="p">)</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="nx">config</span><span class="p">.</span><span class="nx">url</span><span class="p">.</span><span class="nx">startsWith</span><span class="p">(</span><span class="s2">&#34;http&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="nx">config</span><span class="p">.</span><span class="nx">url</span><span class="o">=</span><span class="nx">CryptoJS</span><span class="p">.</span><span class="nx">AES</span><span class="p">.</span><span class="nx">decrypt</span><span class="p">(</span><span class="nx">config</span><span class="p">.</span><span class="nx">url</span><span class="p">,</span><span class="nx">key</span><span class="p">,</span><span class="p">{</span><span class="nx">iv</span><span class="o">:</span><span class="nx">iv</span><span class="p">,</span><span class="nx">padding</span><span class="o">:</span><span class="nx">CryptoJS</span><span class="p">.</span><span class="nx">pad</span><span class="p">.</span><span class="nx">Pkcs7</span><span class="p">}</span><span class="p">)</span><span class="p">.</span><span class="nx">toString</span><span class="p">(</span><span class="nx">CryptoJS</span><span class="p">.</span><span class="nx">enc</span><span class="p">.</span><span class="nx">Utf8</span><span class="p">)</span><span class="p">}</span><span class="k">return</span> <span class="nx">config</span><span class="p">.</span><span class="nx">url</span><span class="p">}</span><span class="k">catch</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span><span class="p">{</span><span class="k">return</span><span class="s2">&#34;&#34;</span><span class="p">}</span><span class="p">}</span><span class="kd">function</span> <span class="nx">urlencode</span><span class="p">(</span><span class="nx">str</span><span class="p">)</span><span class="p">{</span><span class="nx">str</span><span class="o">=</span><span class="p">(</span><span class="nx">str</span><span class="o">+</span><span class="s2">&#34;&#34;</span><span class="p">)</span><span class="p">.</span><span class="nx">toString</span><span class="p">(</span><span class="p">)</span><span class="p">;</span><span class="k">return</span> <span class="nb">encodeURIComponent</span><span class="p">(</span><span class="nx">str</span><span class="p">)</span><span class="p">.</span><span class="nx">replace</span><span class="p">(</span><span class="sr">/!/g</span><span class="p">,</span><span class="s2">&#34;%21&#34;</span><span class="p">)</span><span class="p">.</span><span class="nx">replace</span><span class="p">(</span><span class="sr">/&#39;/g</span><span class="p">,</span><span class="s2">&#34;%27&#34;</span><span class="p">)</span><span class="p">.</span><span class="nx">replace</span><span class="p">(</span><span class="sr">/\(/g</span><span class="p">,</span><span class="s2">&#34;%28&#34;</span><span class="p">)</span><span class="p">.</span><span class="nx">replace</span><span class="p">(</span><span class="sr">/\)/g</span><span class="p">,</span><span class="s2">&#34;%29&#34;</span><span class="p">)</span><span class="p">.</span><span class="nx">replace</span><span class="p">(</span><span class="sr">/\*/g</span><span class="p">,</span><span class="s2">&#34;%2A&#34;</span><span class="p">)</span><span class="p">.</span><span class="nx">replace</span><span class="p">(</span><span class="sr">/%20/g</span><span class="p">,</span><span class="s2">&#34;+&#34;</span><span class="p">)</span><span class="p">}</span><span class="kd">function</span> <span class="nx">base64Encode</span><span class="p">(</span><span class="nx">text</span><span class="p">)</span><span class="p">{</span><span class="k">return</span> <span class="nx">CryptoJS</span><span class="p">.</span><span class="nx">enc</span><span class="p">.</span><span class="nx">Base64</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span><span class="nx">CryptoJS</span><span class="p">.</span><span class="nx">enc</span><span class="p">.</span><span class="nx">Utf8</span><span class="p">.</span><span class="nx">parse</span><span class="p">(</span><span class="nx">text</span><span class="p">)</span><span class="p">)</span><span class="p">}</span><span class="kd">function</span> <span class="nx">base64Decode</span><span class="p">(</span><span class="nx">text</span><span class="p">)</span><span class="p">{</span><span class="k">return</span> <span class="nx">CryptoJS</span><span class="p">.</span><span class="nx">enc</span><span class="p">.</span><span class="nx">Utf8</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span><span class="nx">CryptoJS</span><span class="p">.</span><span class="nx">enc</span><span class="p">.</span><span class="nx">Base64</span><span class="p">.</span><span class="nx">parse</span><span class="p">(</span><span class="nx">text</span><span class="p">)</span><span class="p">)</span><span class="p">}</span><span class="kd">function</span> <span class="nx">md5</span><span class="p">(</span><span class="nx">text</span><span class="p">)</span><span class="p">{</span><span class="k">return</span> <span class="nx">CryptoJS</span><span class="p">.</span><span class="nx">MD5</span><span class="p">(</span><span class="nx">text</span><span class="p">)</span><span class="p">.</span><span class="nx">toString</span><span class="p">(</span><span class="p">)</span><span class="p">}</span><span class="kd">function</span> <span class="nx">encodeStr</span><span class="p">(</span><span class="nx">input</span><span class="p">,</span><span class="nx">encoding</span><span class="p">)</span><span class="p">{</span><span class="nx">encoding</span><span class="o">=</span><span class="nx">encoding</span><span class="o">||</span><span class="s2">&#34;gbk&#34;</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">encoding</span><span class="p">.</span><span class="nx">startsWith</span><span class="p">(</span><span class="s2">&#34;gb&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="kr">const</span> <span class="nx">strTool</span><span class="o">=</span><span class="nx">gbkTool</span><span class="p">(</span><span class="p">)</span><span class="p">;</span><span class="nx">input</span><span class="o">=</span><span class="nx">strTool</span><span class="p">.</span><span class="nx">encode</span><span class="p">(</span><span class="nx">input</span><span class="p">)</span><span class="p">}</span><span class="k">return</span> <span class="nx">input</span><span class="p">}</span><span class="kd">function</span> <span class="nx">decodeStr</span><span class="p">(</span><span class="nx">input</span><span class="p">,</span><span class="nx">encoding</span><span class="p">)</span><span class="p">{</span><span class="nx">encoding</span><span class="o">=</span><span class="nx">encoding</span><span class="o">||</span><span class="s2">&#34;gbk&#34;</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">encoding</span><span class="p">.</span><span class="nx">startsWith</span><span class="p">(</span><span class="s2">&#34;gb&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="kr">const</span> <span class="nx">strTool</span><span class="o">=</span><span class="nx">gbkTool</span><span class="p">(</span><span class="p">)</span><span class="p">;</span><span class="nx">input</span><span class="o">=</span><span class="nx">strTool</span><span class="p">.</span><span class="nx">decode</span><span class="p">(</span><span class="nx">input</span><span class="p">)</span><span class="p">}</span><span class="k">return</span> <span class="nx">input</span><span class="p">}</span><span class="kd">function</span> <span class="nx">getCryptoJS</span><span class="p">(</span><span class="p">)</span><span class="p">{</span><span class="k">return</span><span class="s1">&#39;console.log(&#34;CryptoJS已装载&#34;);&#39;</span><span class="p">}</span><span class="kd">function</span> <span class="nx">forceOrder</span><span class="p">(</span><span class="nx">lists</span><span class="p">,</span><span class="nx">key</span><span class="p">,</span><span class="nx">option</span><span class="p">)</span><span class="p">{</span><span class="kd">let</span> <span class="nx">start</span><span class="o">=</span><span class="nb">Math</span><span class="p">.</span><span class="nx">floor</span><span class="p">(</span><span class="nx">lists</span><span class="p">.</span><span class="nx">length</span><span class="o">/</span><span class="mi">2</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">end</span><span class="o">=</span><span class="nb">Math</span><span class="p">.</span><span class="nx">min</span><span class="p">(</span><span class="nx">lists</span><span class="p">.</span><span class="nx">length</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span><span class="nx">start</span><span class="o">+</span><span class="mi">1</span><span class="p">)</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">start</span><span class="o">&gt;=</span><span class="nx">end</span><span class="p">)</span><span class="p">{</span><span class="k">return</span> <span class="nx">lists</span><span class="p">}</span><span class="kd">let</span> <span class="nx">first</span><span class="o">=</span><span class="nx">lists</span><span class="p">[</span><span class="nx">start</span><span class="p">]</span><span class="p">;</span><span class="kd">let</span> <span class="nx">second</span><span class="o">=</span><span class="nx">lists</span><span class="p">[</span><span class="nx">end</span><span class="p">]</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">key</span><span class="p">)</span><span class="p">{</span><span class="k">try</span><span class="p">{</span><span class="nx">first</span><span class="o">=</span><span class="nx">first</span><span class="p">[</span><span class="nx">key</span><span class="p">]</span><span class="p">;</span><span class="nx">second</span><span class="o">=</span><span class="nx">second</span><span class="p">[</span><span class="nx">key</span><span class="p">]</span><span class="p">}</span><span class="k">catch</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span><span class="p">{</span><span class="p">}</span><span class="p">}</span><span class="k">if</span><span class="p">(</span><span class="nx">option</span><span class="o">&amp;&amp;</span><span class="k">typeof</span> <span class="nx">option</span><span class="o">===</span><span class="s2">&#34;function&#34;</span><span class="p">)</span><span class="p">{</span><span class="k">try</span><span class="p">{</span><span class="nx">first</span><span class="o">=</span><span class="nx">option</span><span class="p">(</span><span class="nx">first</span><span class="p">)</span><span class="p">;</span><span class="nx">second</span><span class="o">=</span><span class="nx">option</span><span class="p">(</span><span class="nx">second</span><span class="p">)</span><span class="p">}</span><span class="k">catch</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span><span class="p">{</span><span class="p">}</span><span class="p">}</span><span class="nx">first</span><span class="o">+=</span><span class="s2">&#34;&#34;</span><span class="p">;</span><span class="nx">second</span><span class="o">+=</span><span class="s2">&#34;&#34;</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">first</span><span class="p">.</span><span class="nx">match</span><span class="p">(</span><span class="sr">/(\d+)/</span><span class="p">)</span><span class="o">&amp;&amp;</span><span class="nx">second</span><span class="p">.</span><span class="nx">match</span><span class="p">(</span><span class="sr">/(\d+)/</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="kd">let</span> <span class="nx">num1</span><span class="o">=</span><span class="nb">Number</span><span class="p">(</span><span class="nx">first</span><span class="p">.</span><span class="nx">match</span><span class="p">(</span><span class="sr">/(\d+)/</span><span class="p">)</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">num2</span><span class="o">=</span><span class="nb">Number</span><span class="p">(</span><span class="nx">second</span><span class="p">.</span><span class="nx">match</span><span class="p">(</span><span class="sr">/(\d+)/</span><span class="p">)</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="p">)</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">num1</span><span class="o">&gt;</span><span class="nx">num2</span><span class="p">)</span><span class="p">{</span><span class="nx">lists</span><span class="p">.</span><span class="nx">reverse</span><span class="p">(</span><span class="p">)</span><span class="p">}</span><span class="p">}</span><span class="k">return</span> <span class="nx">lists</span><span class="p">}</span><span class="kd">let</span> <span class="nx">VODS</span><span class="o">=</span><span class="p">[</span><span class="p">]</span><span class="p">;</span><span class="kd">let</span> <span class="nx">VOD</span><span class="o">=</span><span class="p">{</span><span class="p">}</span><span class="p">;</span><span class="kd">let</span> <span class="nx">TABS</span><span class="o">=</span><span class="p">[</span><span class="p">]</span><span class="p">;</span><span class="kd">let</span> <span class="nx">LISTS</span><span class="o">=</span><span class="p">[</span><span class="p">]</span><span class="p">;</span><span class="nx">globalThis</span><span class="p">.</span><span class="nx">encodeUrl</span><span class="o">=</span><span class="nx">urlencode</span><span class="p">;</span><span class="nx">globalThis</span><span class="p">.</span><span class="nx">urlencode</span><span class="o">=</span><span class="nx">urlencode</span><span class="p">;</span><span class="kd">function</span> <span class="nx">urljoin</span><span class="p">(</span><span class="nx">fromPath</span><span class="p">,</span><span class="nx">nowPath</span><span class="p">)</span><span class="p">{</span><span class="nx">fromPath</span><span class="o">=</span><span class="nx">fromPath</span><span class="o">||</span><span class="s2">&#34;&#34;</span><span class="p">;</span><span class="nx">nowPath</span><span class="o">=</span><span class="nx">nowPath</span><span class="o">||</span><span class="s2">&#34;&#34;</span><span class="p">;</span><span class="k">return</span> <span class="nx">joinUrl</span><span class="p">(</span><span class="nx">fromPath</span><span class="p">,</span><span class="nx">nowPath</span><span class="p">)</span><span class="p">}</span><span class="kd">var</span> <span class="nx">urljoin2</span><span class="o">=</span><span class="nx">urljoin</span><span class="p">;</span><span class="kr">const</span> <span class="nx">defaultParser</span><span class="o">=</span><span class="p">{</span><span class="nx">pdfh</span><span class="o">:</span><span class="nx">pdfh</span><span class="p">,</span><span class="nx">pdfa</span><span class="o">:</span><span class="nx">pdfa</span><span class="p">,</span><span class="nx">pd</span><span class="o">:</span><span class="nx">pd</span><span class="p">}</span><span class="p">;</span><span class="kd">function</span> <span class="nx">pdfh2</span><span class="p">(</span><span class="nx">html</span><span class="p">,</span><span class="nx">parse</span><span class="p">)</span><span class="p">{</span><span class="kd">let</span> <span class="nx">html2</span><span class="o">=</span><span class="nx">html</span><span class="p">;</span><span class="k">try</span><span class="p">{</span><span class="k">if</span><span class="p">(</span><span class="k">typeof</span> <span class="nx">html</span><span class="o">!==</span><span class="s2">&#34;string&#34;</span><span class="p">)</span><span class="p">{</span><span class="nx">html2</span><span class="o">=</span><span class="nx">html</span><span class="p">.</span><span class="nx">rr</span><span class="p">(</span><span class="nx">html</span><span class="p">.</span><span class="nx">ele</span><span class="p">)</span><span class="p">.</span><span class="nx">toString</span><span class="p">(</span><span class="p">)</span><span class="p">}</span><span class="p">}</span><span class="k">catch</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span><span class="p">{</span><span class="nx">print</span><span class="p">(</span><span class="s2">&#34;html对象转文本发生了错误:&#34;</span><span class="o">+</span><span class="nx">e</span><span class="p">.</span><span class="nx">message</span><span class="p">)</span><span class="p">}</span><span class="kd">let</span> <span class="nx">result</span><span class="o">=</span><span class="nx">defaultParser</span><span class="p">.</span><span class="nx">pdfh</span><span class="p">(</span><span class="nx">html2</span><span class="p">,</span><span class="nx">parse</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">option</span><span class="o">=</span><span class="nx">parse</span><span class="p">.</span><span class="nx">includes</span><span class="p">(</span><span class="s2">&#34;&amp;&amp;&#34;</span><span class="p">)</span><span class="o">?</span><span class="nx">parse</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span><span class="s2">&#34;&amp;&amp;&#34;</span><span class="p">)</span><span class="p">.</span><span class="nx">slice</span><span class="p">(</span><span class="o">-</span><span class="mi">1</span><span class="p">)</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">:</span><span class="nx">parse</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span><span class="s2">&#34; &#34;</span><span class="p">)</span><span class="p">.</span><span class="nx">slice</span><span class="p">(</span><span class="o">-</span><span class="mi">1</span><span class="p">)</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="sr">/style/</span><span class="p">.</span><span class="nx">test</span><span class="p">(</span><span class="nx">option</span><span class="p">.</span><span class="nx">toLowerCase</span><span class="p">(</span><span class="p">)</span><span class="p">)</span><span class="o">&amp;&amp;</span><span class="sr">/url\(/</span><span class="p">.</span><span class="nx">test</span><span class="p">(</span><span class="nx">result</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="k">try</span><span class="p">{</span><span class="nx">result</span><span class="o">=</span><span class="nx">result</span><span class="p">.</span><span class="nx">match</span><span class="p">(</span><span class="sr">/url\((.*?)\)/</span><span class="p">)</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="p">}</span><span class="k">catch</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span><span class="p">{</span><span class="p">}</span><span class="p">}</span><span class="k">return</span> <span class="nx">result</span><span class="p">}</span><span class="kd">function</span> <span class="nx">pdfa2</span><span class="p">(</span><span class="nx">html</span><span class="p">,</span><span class="nx">parse</span><span class="p">)</span><span class="p">{</span><span class="kd">let</span> <span class="nx">html2</span><span class="o">=</span><span class="nx">html</span><span class="p">;</span><span class="k">try</span><span class="p">{</span><span class="k">if</span><span class="p">(</span><span class="k">typeof</span> <span class="nx">html</span><span class="o">!==</span><span class="s2">&#34;string&#34;</span><span class="p">)</span><span class="p">{</span><span class="nx">html2</span><span class="o">=</span><span class="nx">html</span><span class="p">.</span><span class="nx">rr</span><span class="p">(</span><span class="nx">html</span><span class="p">.</span><span class="nx">ele</span><span class="p">)</span><span class="p">.</span><span class="nx">toString</span><span class="p">(</span><span class="p">)</span><span class="p">}</span><span class="p">}</span><span class="k">catch</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span><span class="p">{</span><span class="nx">print</span><span class="p">(</span><span class="s2">&#34;html对象转文本发生了错误:&#34;</span><span class="o">+</span><span class="nx">e</span><span class="p">.</span><span class="nx">message</span><span class="p">)</span><span class="p">}</span><span class="k">return</span> <span class="nx">defaultParser</span><span class="p">.</span><span class="nx">pdfa</span><span class="p">(</span><span class="nx">html2</span><span class="p">,</span><span class="nx">parse</span><span class="p">)</span><span class="p">}</span><span class="kd">function</span> <span class="nx">pd2</span><span class="p">(</span><span class="nx">html</span><span class="p">,</span><span class="nx">parse</span><span class="p">,</span><span class="nx">uri</span><span class="p">)</span><span class="p">{</span><span class="kd">let</span> <span class="nx">ret</span><span class="o">=</span><span class="nx">pdfh2</span><span class="p">(</span><span class="nx">html</span><span class="p">,</span><span class="nx">parse</span><span class="p">)</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="k">typeof</span> <span class="nx">uri</span><span class="o">===</span><span class="s2">&#34;undefined&#34;</span><span class="o">||</span><span class="o">!</span><span class="nx">uri</span><span class="p">)</span><span class="p">{</span><span class="nx">uri</span><span class="o">=</span><span class="s2">&#34;&#34;</span><span class="p">}</span><span class="k">if</span><span class="p">(</span><span class="nx">DOM_CHECK_ATTR</span><span class="p">.</span><span class="nx">test</span><span class="p">(</span><span class="nx">parse</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="k">if</span><span class="p">(</span><span class="sr">/http/</span><span class="p">.</span><span class="nx">test</span><span class="p">(</span><span class="nx">ret</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="nx">ret</span><span class="o">=</span><span class="nx">ret</span><span class="p">.</span><span class="nx">substr</span><span class="p">(</span><span class="nx">ret</span><span class="p">.</span><span class="nx">indexOf</span><span class="p">(</span><span class="s2">&#34;http&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">}</span><span class="k">else</span><span class="p">{</span><span class="nx">ret</span><span class="o">=</span><span class="nx">urljoin</span><span class="p">(</span><span class="nx">MY_URL</span><span class="p">,</span><span class="nx">ret</span><span class="p">)</span><span class="p">}</span><span class="p">}</span><span class="k">return</span> <span class="nx">ret</span><span class="p">}</span><span class="kr">const</span> <span class="nx">parseTags</span><span class="o">=</span><span class="p">{</span><span class="nx">jsp</span><span class="o">:</span><span class="p">{</span><span class="nx">pdfh</span><span class="o">:</span><span class="nx">pdfh2</span><span class="p">,</span><span class="nx">pdfa</span><span class="o">:</span><span class="nx">pdfa2</span><span class="p">,</span><span class="nx">pd</span><span class="o">:</span><span class="nx">pd2</span><span class="p">}</span><span class="p">,</span><span class="nx">json</span><span class="o">:</span><span class="p">{</span><span class="nx">pdfh</span><span class="p">(</span><span class="nx">html</span><span class="p">,</span><span class="nx">parse</span><span class="p">)</span><span class="p">{</span><span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="nx">parse</span><span class="o">||</span><span class="o">!</span><span class="nx">parse</span><span class="p">.</span><span class="nx">trim</span><span class="p">(</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="k">return</span><span class="s2">&#34;&#34;</span><span class="p">}</span><span class="k">if</span><span class="p">(</span><span class="k">typeof</span> <span class="nx">html</span><span class="o">===</span><span class="s2">&#34;string&#34;</span><span class="p">)</span><span class="p">{</span><span class="nx">html</span><span class="o">=</span><span class="nx">JSON</span><span class="p">.</span><span class="nx">parse</span><span class="p">(</span><span class="nx">html</span><span class="p">)</span><span class="p">}</span><span class="nx">parse</span><span class="o">=</span><span class="nx">parse</span><span class="p">.</span><span class="nx">trim</span><span class="p">(</span><span class="p">)</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="nx">parse</span><span class="p">.</span><span class="nx">startsWith</span><span class="p">(</span><span class="s2">&#34;$.&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="nx">parse</span><span class="o">=</span><span class="s2">&#34;$.&#34;</span><span class="o">+</span><span class="nx">parse</span><span class="p">}</span><span class="nx">parse</span><span class="o">=</span><span class="nx">parse</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span><span class="s2">&#34;||&#34;</span><span class="p">)</span><span class="p">;</span><span class="k">for</span><span class="p">(</span><span class="kd">let</span> <span class="nx">ps</span> <span class="k">of</span> <span class="nx">parse</span><span class="p">)</span><span class="p">{</span><span class="kd">let</span> <span class="nx">ret</span><span class="o">=</span><span class="nx">cheerio</span><span class="p">.</span><span class="nx">jp</span><span class="p">(</span><span class="nx">ps</span><span class="p">,</span><span class="nx">html</span><span class="p">)</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nb">Array</span><span class="p">.</span><span class="nx">isArray</span><span class="p">(</span><span class="nx">ret</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="nx">ret</span><span class="o">=</span><span class="nx">ret</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">||</span><span class="s2">&#34;&#34;</span><span class="p">}</span><span class="k">else</span><span class="p">{</span><span class="nx">ret</span><span class="o">=</span><span class="nx">ret</span><span class="o">||</span><span class="s2">&#34;&#34;</span><span class="p">}</span><span class="k">if</span><span class="p">(</span><span class="nx">ret</span><span class="o">&amp;&amp;</span><span class="k">typeof</span> <span class="nx">ret</span><span class="o">!==</span><span class="s2">&#34;string&#34;</span><span class="p">)</span><span class="p">{</span><span class="nx">ret</span><span class="o">=</span><span class="nx">ret</span><span class="p">.</span><span class="nx">toString</span><span class="p">(</span><span class="p">)</span><span class="p">}</span><span class="k">if</span><span class="p">(</span><span class="nx">ret</span><span class="p">)</span><span class="p">{</span><span class="k">return</span> <span class="nx">ret</span><span class="p">}</span><span class="p">}</span><span class="k">return</span><span class="s2">&#34;&#34;</span><span class="p">}</span><span class="p">,</span><span class="nx">pdfa</span><span class="p">(</span><span class="nx">html</span><span class="p">,</span><span class="nx">parse</span><span class="p">)</span><span class="p">{</span><span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="nx">parse</span><span class="o">||</span><span class="o">!</span><span class="nx">parse</span><span class="p">.</span><span class="nx">trim</span><span class="p">(</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="k">return</span><span class="s2">&#34;&#34;</span><span class="p">}</span><span class="k">if</span><span class="p">(</span><span class="k">typeof</span> <span class="nx">html</span><span class="o">===</span><span class="s2">&#34;string&#34;</span><span class="p">)</span><span class="p">{</span><span class="nx">html</span><span class="o">=</span><span class="nx">JSON</span><span class="p">.</span><span class="nx">parse</span><span class="p">(</span><span class="nx">html</span><span class="p">)</span><span class="p">}</span><span class="nx">parse</span><span class="o">=</span><span class="nx">parse</span><span class="p">.</span><span class="nx">trim</span><span class="p">(</span><span class="p">)</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="nx">parse</span><span class="p">.</span><span class="nx">startsWith</span><span class="p">(</span><span class="s2">&#34;$.&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="nx">parse</span><span class="o">=</span><span class="s2">&#34;$.&#34;</span><span class="o">+</span><span class="nx">parse</span><span class="p">}</span><span class="kd">let</span> <span class="nx">ret</span><span class="o">=</span><span class="nx">cheerio</span><span class="p">.</span><span class="nx">jp</span><span class="p">(</span><span class="nx">parse</span><span class="p">,</span><span class="nx">html</span><span class="p">)</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nb">Array</span><span class="p">.</span><span class="nx">isArray</span><span class="p">(</span><span class="nx">ret</span><span class="p">)</span><span class="o">&amp;&amp;</span><span class="nb">Array</span><span class="p">.</span><span class="nx">isArray</span><span class="p">(</span><span class="nx">ret</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="p">)</span><span class="o">&amp;&amp;</span><span class="nx">ret</span><span class="p">.</span><span class="nx">length</span><span class="o">===</span><span class="mi">1</span><span class="p">)</span><span class="p">{</span><span class="k">return</span> <span class="nx">ret</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">||</span><span class="p">[</span><span class="p">]</span><span class="p">}</span><span class="k">return</span> <span class="nx">ret</span><span class="o">||</span><span class="p">[</span><span class="p">]</span><span class="p">}</span><span class="p">,</span><span class="nx">pd</span><span class="p">(</span><span class="nx">html</span><span class="p">,</span><span class="nx">parse</span><span class="p">)</span><span class="p">{</span><span class="kd">let</span> <span class="nx">ret</span><span class="o">=</span><span class="nx">parseTags</span><span class="p">.</span><span class="nx">json</span><span class="p">.</span><span class="nx">pdfh</span><span class="p">(</span><span class="nx">html</span><span class="p">,</span><span class="nx">parse</span><span class="p">)</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">ret</span><span class="p">)</span><span class="p">{</span><span class="k">return</span> <span class="nx">urljoin</span><span class="p">(</span><span class="nx">MY_URL</span><span class="p">,</span><span class="nx">ret</span><span class="p">)</span><span class="p">}</span><span class="k">return</span> <span class="nx">ret</span><span class="p">}</span><span class="p">}</span><span class="p">,</span><span class="nx">jq</span><span class="o">:</span><span class="p">{</span><span class="nx">pdfh</span><span class="p">(</span><span class="nx">html</span><span class="p">,</span><span class="nx">parse</span><span class="p">)</span><span class="p">{</span><span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="nx">html</span><span class="o">||</span><span class="o">!</span><span class="nx">parse</span><span class="o">||</span><span class="o">!</span><span class="nx">parse</span><span class="p">.</span><span class="nx">trim</span><span class="p">(</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="k">return</span><span class="s2">&#34;&#34;</span><span class="p">}</span><span class="nx">parse</span><span class="o">=</span><span class="nx">parse</span><span class="p">.</span><span class="nx">trim</span><span class="p">(</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">result</span><span class="o">=</span><span class="nx">defaultParser</span><span class="p">.</span><span class="nx">pdfh</span><span class="p">(</span><span class="nx">html</span><span class="p">,</span><span class="nx">parse</span><span class="p">)</span><span class="p">;</span><span class="k">return</span> <span class="nx">result</span><span class="p">}</span><span class="p">,</span><span class="nx">pdfa</span><span class="p">(</span><span class="nx">html</span><span class="p">,</span><span class="nx">parse</span><span class="p">)</span><span class="p">{</span><span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="nx">html</span><span class="o">||</span><span class="o">!</span><span class="nx">parse</span><span class="o">||</span><span class="o">!</span><span class="nx">parse</span><span class="p">.</span><span class="nx">trim</span><span class="p">(</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="k">return</span><span class="p">[</span><span class="p">]</span><span class="p">}</span><span class="nx">parse</span><span class="o">=</span><span class="nx">parse</span><span class="p">.</span><span class="nx">trim</span><span class="p">(</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">result</span><span class="o">=</span><span class="nx">defaultParser</span><span class="p">.</span><span class="nx">pdfa</span><span class="p">(</span><span class="nx">html</span><span class="p">,</span><span class="nx">parse</span><span class="p">)</span><span class="p">;</span><span class="nx">print</span><span class="p">(</span><span class="sb">`</span><span class="sb">pdfa解析</span><span class="si">${</span><span class="nx">parse</span><span class="si">}</span><span class="sb">=&gt;</span><span class="si">${</span><span class="nx">result</span><span class="p">.</span><span class="nx">length</span><span class="si">}</span><span class="sb">`</span><span class="p">)</span><span class="p">;</span><span class="k">return</span> <span class="nx">result</span><span class="p">}</span><span class="p">,</span><span class="nx">pd</span><span class="p">(</span><span class="nx">html</span><span class="p">,</span><span class="nx">parse</span><span class="p">,</span><span class="nx">base_url</span><span class="p">)</span><span class="p">{</span><span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="nx">html</span><span class="o">||</span><span class="o">!</span><span class="nx">parse</span><span class="o">||</span><span class="o">!</span><span class="nx">parse</span><span class="p">.</span><span class="nx">trim</span><span class="p">(</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="k">return</span><span class="s2">&#34;&#34;</span><span class="p">}</span><span class="nx">parse</span><span class="o">=</span><span class="nx">parse</span><span class="p">.</span><span class="nx">trim</span><span class="p">(</span><span class="p">)</span><span class="p">;</span><span class="nx">base_url</span><span class="o">=</span><span class="nx">base_url</span><span class="o">||</span><span class="nx">MY_URL</span><span class="p">;</span><span class="k">return</span> <span class="nx">defaultParser</span><span class="p">.</span><span class="nx">pd</span><span class="p">(</span><span class="nx">html</span><span class="p">,</span><span class="nx">parse</span><span class="p">,</span><span class="nx">base_url</span><span class="p">)</span><span class="p">}</span><span class="p">}</span><span class="p">,</span><span class="nx">getParse</span><span class="p">(</span><span class="nx">p0</span><span class="p">)</span><span class="p">{</span><span class="k">if</span><span class="p">(</span><span class="nx">p0</span><span class="p">.</span><span class="nx">startsWith</span><span class="p">(</span><span class="s2">&#34;jsp:&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="k">return</span> <span class="k">this</span><span class="p">.</span><span class="nx">jsp</span><span class="p">}</span><span class="k">else</span> <span class="k">if</span><span class="p">(</span><span class="nx">p0</span><span class="p">.</span><span class="nx">startsWith</span><span class="p">(</span><span class="s2">&#34;json:&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="k">return</span> <span class="k">this</span><span class="p">.</span><span class="nx">json</span><span class="p">}</span><span class="k">else</span> <span class="k">if</span><span class="p">(</span><span class="nx">p0</span><span class="p">.</span><span class="nx">startsWith</span><span class="p">(</span><span class="s2">&#34;jq:&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="k">return</span> <span class="k">this</span><span class="p">.</span><span class="nx">jq</span><span class="p">}</span><span class="k">else</span><span class="p">{</span><span class="k">return</span> <span class="k">this</span><span class="p">.</span><span class="nx">jq</span><span class="p">}</span><span class="p">}</span><span class="p">}</span><span class="p">;</span><span class="kr">const</span> <span class="nx">stringify</span><span class="o">=</span><span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">;</span><span class="kr">const</span> <span class="nx">jsp</span><span class="o">=</span><span class="nx">parseTags</span><span class="p">.</span><span class="nx">jsp</span><span class="p">;</span><span class="kr">const</span> <span class="nx">jq</span><span class="o">=</span><span class="nx">parseTags</span><span class="p">.</span><span class="nx">jq</span><span class="p">;</span><span class="kd">function</span> <span class="nx">readFile</span><span class="p">(</span><span class="nx">filePath</span><span class="p">)</span><span class="p">{</span><span class="nx">filePath</span><span class="o">=</span><span class="nx">filePath</span><span class="o">||</span><span class="s2">&#34;./uri.min.js&#34;</span><span class="p">;</span><span class="kd">var</span> <span class="nx">fd</span><span class="o">=</span><span class="nx">os</span><span class="p">.</span><span class="nx">open</span><span class="p">(</span><span class="nx">filePath</span><span class="p">)</span><span class="p">;</span><span class="kd">var</span> <span class="nx">buffer</span><span class="o">=</span><span class="k">new</span> <span class="nx">ArrayBuffer</span><span class="p">(</span><span class="mi">1024</span><span class="p">)</span><span class="p">;</span><span class="kd">var</span> <span class="nx">len</span><span class="o">=</span><span class="nx">os</span><span class="p">.</span><span class="nx">read</span><span class="p">(</span><span class="nx">fd</span><span class="p">,</span><span class="nx">buffer</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="mi">1024</span><span class="p">)</span><span class="p">;</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">len</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">text</span><span class="o">=</span><span class="nb">String</span><span class="p">.</span><span class="nx">fromCharCode</span><span class="p">.</span><span class="nx">apply</span><span class="p">(</span><span class="kc">null</span><span class="p">,</span><span class="k">new</span> <span class="nx">Uint8Array</span><span class="p">(</span><span class="nx">buffer</span><span class="p">)</span><span class="p">)</span><span class="p">;</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">text</span><span class="p">)</span><span class="p">;</span><span class="k">return</span> <span class="nx">text</span><span class="p">}</span><span class="kd">function</span> <span class="nx">dealJson</span><span class="p">(</span><span class="nx">html</span><span class="p">)</span><span class="p">{</span><span class="k">try</span><span class="p">{</span><span class="nx">html</span><span class="o">=</span><span class="nx">html</span><span class="p">.</span><span class="nx">trim</span><span class="p">(</span><span class="p">)</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="p">(</span><span class="nx">html</span><span class="p">.</span><span class="nx">startsWith</span><span class="p">(</span><span class="s2">&#34;{&#34;</span><span class="p">)</span><span class="o">&amp;&amp;</span><span class="nx">html</span><span class="p">.</span><span class="nx">endsWith</span><span class="p">(</span><span class="s2">&#34;}&#34;</span><span class="p">)</span><span class="o">||</span><span class="nx">html</span><span class="p">.</span><span class="nx">startsWith</span><span class="p">(</span><span class="s2">&#34;[&#34;</span><span class="p">)</span><span class="o">&amp;&amp;</span><span class="nx">html</span><span class="p">.</span><span class="nx">endsWith</span><span class="p">(</span><span class="s2">&#34;]&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="nx">html</span><span class="o">=</span><span class="s2">&#34;{&#34;</span><span class="o">+</span><span class="nx">html</span><span class="p">.</span><span class="nx">match</span><span class="p">(</span><span class="sr">/.*?\{(.*)\}/m</span><span class="p">)</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="o">+</span><span class="s2">&#34;}&#34;</span><span class="p">}</span><span class="p">}</span><span class="k">catch</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span><span class="p">{</span><span class="p">}</span><span class="k">try</span><span class="p">{</span><span class="nx">html</span><span class="o">=</span><span class="nx">JSON</span><span class="p">.</span><span class="nx">parse</span><span class="p">(</span><span class="nx">html</span><span class="p">)</span><span class="p">}</span><span class="k">catch</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span><span class="p">{</span><span class="p">}</span><span class="k">return</span> <span class="nx">html</span><span class="p">}</span><span class="kd">var</span> <span class="nx">OcrApi</span><span class="o">=</span><span class="p">{</span><span class="nx">api</span><span class="o">:</span><span class="nx">OCR_API</span><span class="p">,</span><span class="nx">classification</span><span class="o">:</span><span class="kd">function</span><span class="p">(</span><span class="nx">img</span><span class="p">)</span><span class="p">{</span><span class="kd">let</span> <span class="nx">code</span><span class="o">=</span><span class="s2">&#34;&#34;</span><span class="p">;</span><span class="k">try</span><span class="p">{</span><span class="nx">log</span><span class="p">(</span><span class="s2">&#34;通过drpy_ocr验证码接口过验证...&#34;</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">html</span><span class="o">=</span><span class="nx">request</span><span class="p">(</span><span class="nx">OCR_API</span><span class="p">,</span><span class="p">{</span><span class="nx">data</span><span class="o">:</span><span class="p">{</span><span class="nx">img</span><span class="o">:</span><span class="nx">img</span><span class="p">}</span><span class="p">,</span><span class="nx">headers</span><span class="o">:</span><span class="p">{</span><span class="s2">&#34;User-Agent&#34;</span><span class="o">:</span><span class="nx">PC_UA</span><span class="p">}</span><span class="p">,</span><span class="nx">method</span><span class="o">:</span><span class="s2">&#34;POST&#34;</span><span class="p">}</span><span class="p">,</span><span class="kc">true</span><span class="p">)</span><span class="p">;</span><span class="nx">code</span><span class="o">=</span><span class="nx">html</span><span class="o">||</span><span class="s2">&#34;&#34;</span><span class="p">}</span><span class="k">catch</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span><span class="p">{</span><span class="nx">log</span><span class="p">(</span><span class="sb">`</span><span class="sb">OCR识别验证码发生错误:</span><span class="si">${</span><span class="nx">e</span><span class="p">.</span><span class="nx">message</span><span class="si">}</span><span class="sb">`</span><span class="p">)</span><span class="p">}</span><span class="k">return</span> <span class="nx">code</span><span class="p">}</span><span class="p">}</span><span class="p">;</span><span class="kd">function</span> <span class="nx">verifyCode</span><span class="p">(</span><span class="nx">url</span><span class="p">)</span><span class="p">{</span><span class="kd">let</span> <span class="nx">cnt</span><span class="o">=</span><span class="mi">0</span><span class="p">;</span><span class="kd">let</span> <span class="nx">host</span><span class="o">=</span><span class="nx">getHome</span><span class="p">(</span><span class="nx">url</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">cookie</span><span class="o">=</span><span class="s2">&#34;&#34;</span><span class="p">;</span><span class="k">while</span><span class="p">(</span><span class="nx">cnt</span><span class="o">&lt;</span><span class="nx">OCR_RETRY</span><span class="p">)</span><span class="p">{</span><span class="k">try</span><span class="p">{</span><span class="kd">let</span> <span class="nx">yzm_url</span><span class="o">=</span><span class="sb">`</span><span class="si">${</span><span class="nx">host</span><span class="si">}</span><span class="sb">/index.php/verify/index.html</span><span class="sb">`</span><span class="p">;</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="sb">`</span><span class="sb">验证码链接:</span><span class="si">${</span><span class="nx">yzm_url</span><span class="si">}</span><span class="sb">`</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">hhtml</span><span class="o">=</span><span class="nx">request</span><span class="p">(</span><span class="nx">yzm_url</span><span class="p">,</span><span class="p">{</span><span class="nx">withHeaders</span><span class="o">:</span><span class="kc">true</span><span class="p">,</span><span class="nx">toBase64</span><span class="o">:</span><span class="kc">true</span><span class="p">}</span><span class="p">,</span><span class="kc">true</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">json</span><span class="o">=</span><span class="nx">JSON</span><span class="p">.</span><span class="nx">parse</span><span class="p">(</span><span class="nx">hhtml</span><span class="p">)</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="nx">cookie</span><span class="p">)</span><span class="p">{</span><span class="kd">let</span> <span class="nx">setCk</span><span class="o">=</span><span class="nb">Object</span><span class="p">.</span><span class="nx">keys</span><span class="p">(</span><span class="nx">json</span><span class="p">)</span><span class="p">.</span><span class="nx">find</span><span class="p">(</span><span class="nx">it</span><span class="p">=&gt;</span><span class="nx">it</span><span class="p">.</span><span class="nx">toLowerCase</span><span class="p">(</span><span class="p">)</span><span class="o">===</span><span class="s2">&#34;set-cookie&#34;</span><span class="p">)</span><span class="p">;</span><span class="nx">cookie</span><span class="o">=</span><span class="nx">setCk</span><span class="o">?</span><span class="nx">json</span><span class="p">[</span><span class="nx">setCk</span><span class="p">]</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span><span class="s2">&#34;;&#34;</span><span class="p">)</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">:</span><span class="s2">&#34;&#34;</span><span class="p">}</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="s2">&#34;cookie:&#34;</span><span class="o">+</span><span class="nx">cookie</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">img</span><span class="o">=</span><span class="nx">json</span><span class="p">.</span><span class="nx">body</span><span class="p">;</span><span class="kd">let</span> <span class="nx">code</span><span class="o">=</span><span class="nx">OcrApi</span><span class="p">.</span><span class="nx">classification</span><span class="p">(</span><span class="nx">img</span><span class="p">)</span><span class="p">;</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="sb">`</span><span class="sb">第</span><span class="si">${</span><span class="nx">cnt</span><span class="o">+</span><span class="mi">1</span><span class="si">}</span><span class="sb">次验证码识别结果:</span><span class="si">${</span><span class="nx">code</span><span class="si">}</span><span class="sb">`</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">submit_url</span><span class="o">=</span><span class="sb">`</span><span class="si">${</span><span class="nx">host</span><span class="si">}</span><span class="sb">/index.php/ajax/verify_check?type=search&amp;verify=</span><span class="si">${</span><span class="nx">code</span><span class="si">}</span><span class="sb">`</span><span class="p">;</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">submit_url</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">html</span><span class="o">=</span><span class="nx">request</span><span class="p">(</span><span class="nx">submit_url</span><span class="p">,</span><span class="p">{</span><span class="nx">headers</span><span class="o">:</span><span class="p">{</span><span class="nx">Cookie</span><span class="o">:</span><span class="nx">cookie</span><span class="p">,</span><span class="s2">&#34;User-Agent&#34;</span><span class="o">:</span><span class="nx">MOBILE_UA</span><span class="p">}</span><span class="p">,</span><span class="nx">method</span><span class="o">:</span><span class="s2">&#34;POST&#34;</span><span class="p">}</span><span class="p">)</span><span class="p">;</span><span class="nx">html</span><span class="o">=</span><span class="nx">JSON</span><span class="p">.</span><span class="nx">parse</span><span class="p">(</span><span class="nx">html</span><span class="p">)</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">html</span><span class="p">.</span><span class="nx">msg</span><span class="o">===</span><span class="s2">&#34;ok&#34;</span><span class="p">)</span><span class="p">{</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="sb">`</span><span class="sb">第</span><span class="si">${</span><span class="nx">cnt</span><span class="o">+</span><span class="mi">1</span><span class="si">}</span><span class="sb">次验证码提交成功</span><span class="sb">`</span><span class="p">)</span><span class="p">;</span><span class="k">return</span> <span class="nx">cookie</span><span class="p">}</span><span class="k">else</span> <span class="k">if</span><span class="p">(</span><span class="nx">html</span><span class="p">.</span><span class="nx">msg</span><span class="o">!==</span><span class="s2">&#34;ok&#34;</span><span class="o">&amp;&amp;</span><span class="nx">cnt</span><span class="o">+</span><span class="mi">1</span><span class="o">&gt;=</span><span class="nx">OCR_RETRY</span><span class="p">)</span><span class="p">{</span><span class="nx">cookie</span><span class="o">=</span><span class="s2">&#34;&#34;</span><span class="p">}</span><span class="p">}</span><span class="k">catch</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span><span class="p">{</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="sb">`</span><span class="sb">第</span><span class="si">${</span><span class="nx">cnt</span><span class="o">+</span><span class="mi">1</span><span class="si">}</span><span class="sb">次验证码提交失败:</span><span class="si">${</span><span class="nx">e</span><span class="p">.</span><span class="nx">message</span><span class="si">}</span><span class="sb">`</span><span class="p">)</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">cnt</span><span class="o">+</span><span class="mi">1</span><span class="o">&gt;=</span><span class="nx">OCR_RETRY</span><span class="p">)</span><span class="p">{</span><span class="nx">cookie</span><span class="o">=</span><span class="s2">&#34;&#34;</span><span class="p">}</span><span class="p">}</span><span class="nx">cnt</span><span class="o">+=</span><span class="mi">1</span><span class="p">}</span><span class="k">return</span> <span class="nx">cookie</span><span class="p">}</span><span class="kd">function</span> <span class="nx">setItem</span><span class="p">(</span><span class="nx">k</span><span class="p">,</span><span class="nx">v</span><span class="p">)</span><span class="p">{</span><span class="nx">local</span><span class="p">.</span><span class="nx">set</span><span class="p">(</span><span class="nx">RKEY</span><span class="p">,</span><span class="nx">k</span><span class="p">,</span><span class="nx">v</span><span class="p">)</span><span class="p">;</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="sb">`</span><span class="sb">规则</span><span class="si">${</span><span class="nx">RKEY</span><span class="si">}</span><span class="sb">设置</span><span class="si">${</span><span class="nx">k</span><span class="si">}</span><span class="sb"> =&gt; </span><span class="si">${</span><span class="nx">v</span><span class="si">}</span><span class="sb">`</span><span class="p">)</span><span class="p">}</span><span class="kd">function</span> <span class="nx">getItem</span><span class="p">(</span><span class="nx">k</span><span class="p">,</span><span class="nx">v</span><span class="p">)</span><span class="p">{</span><span class="k">return</span> <span class="nx">local</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">RKEY</span><span class="p">,</span><span class="nx">k</span><span class="p">)</span><span class="o">||</span><span class="nx">v</span><span class="p">}</span><span class="kd">function</span> <span class="nx">clearItem</span><span class="p">(</span><span class="nx">k</span><span class="p">)</span><span class="p">{</span><span class="nx">local</span><span class="p">.</span><span class="k">delete</span><span class="p">(</span><span class="nx">RKEY</span><span class="p">,</span><span class="nx">k</span><span class="p">)</span><span class="p">}</span><span class="kd">function</span> <span class="nx">getHome</span><span class="p">(</span><span class="nx">url</span><span class="p">)</span><span class="p">{</span><span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="nx">url</span><span class="p">)</span><span class="p">{</span><span class="k">return</span><span class="s2">&#34;&#34;</span><span class="p">}</span><span class="kd">let</span> <span class="nx">tmp</span><span class="o">=</span><span class="nx">url</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span><span class="s2">&#34;//&#34;</span><span class="p">)</span><span class="p">;</span><span class="nx">url</span><span class="o">=</span><span class="nx">tmp</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">+</span><span class="s2">&#34;//&#34;</span><span class="o">+</span><span class="nx">tmp</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span><span class="s2">&#34;/&#34;</span><span class="p">)</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="p">;</span><span class="k">try</span><span class="p">{</span><span class="nx">url</span><span class="o">=</span><span class="nb">decodeURIComponent</span><span class="p">(</span><span class="nx">url</span><span class="p">)</span><span class="p">}</span><span class="k">catch</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span><span class="p">{</span><span class="p">}</span><span class="k">return</span> <span class="nx">url</span><span class="p">}</span><span class="kd">function</span> <span class="nx">buildUrl</span><span class="p">(</span><span class="nx">url</span><span class="p">,</span><span class="nx">obj</span><span class="p">)</span><span class="p">{</span><span class="nx">obj</span><span class="o">=</span><span class="nx">obj</span><span class="o">||</span><span class="p">{</span><span class="p">}</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">url</span><span class="p">.</span><span class="nx">indexOf</span><span class="p">(</span><span class="s2">&#34;?&#34;</span><span class="p">)</span><span class="o">&lt;</span><span class="mi">0</span><span class="p">)</span><span class="p">{</span><span class="nx">url</span><span class="o">+=</span><span class="s2">&#34;?&#34;</span><span class="p">}</span><span class="kd">let</span> <span class="nx">param_list</span><span class="o">=</span><span class="p">[</span><span class="p">]</span><span class="p">;</span><span class="kd">let</span> <span class="nx">keys</span><span class="o">=</span><span class="nb">Object</span><span class="p">.</span><span class="nx">keys</span><span class="p">(</span><span class="nx">obj</span><span class="p">)</span><span class="p">;</span><span class="nx">keys</span><span class="p">.</span><span class="nx">forEach</span><span class="p">(</span><span class="nx">it</span><span class="p">=&gt;</span><span class="p">{</span><span class="nx">param_list</span><span class="p">.</span><span class="nx">push</span><span class="p">(</span><span class="nx">it</span><span class="o">+</span><span class="s2">&#34;=&#34;</span><span class="o">+</span><span class="nx">obj</span><span class="p">[</span><span class="nx">it</span><span class="p">]</span><span class="p">)</span><span class="p">}</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">prs</span><span class="o">=</span><span class="nx">param_list</span><span class="p">.</span><span class="nx">join</span><span class="p">(</span><span class="s2">&#34;&amp;&#34;</span><span class="p">)</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">keys</span><span class="p">.</span><span class="nx">length</span><span class="o">&gt;</span><span class="mi">0</span><span class="o">&amp;&amp;</span><span class="o">!</span><span class="nx">url</span><span class="p">.</span><span class="nx">endsWith</span><span class="p">(</span><span class="s2">&#34;?&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="nx">url</span><span class="o">+=</span><span class="s2">&#34;&amp;&#34;</span><span class="p">}</span><span class="nx">url</span><span class="o">+=</span><span class="nx">prs</span><span class="p">;</span><span class="k">return</span> <span class="nx">url</span><span class="p">}</span><span class="kd">function</span> <span class="nx">require</span><span class="p">(</span><span class="nx">url</span><span class="p">)</span><span class="p">{</span><span class="nb">eval</span><span class="p">(</span><span class="nx">request</span><span class="p">(</span><span class="nx">url</span><span class="p">)</span><span class="p">)</span><span class="p">}</span><span class="kd">function</span> <span class="nx">request</span><span class="p">(</span><span class="nx">url</span><span class="p">,</span><span class="nx">obj</span><span class="p">,</span><span class="nx">ocr_flag</span><span class="p">)</span><span class="p">{</span><span class="nx">ocr_flag</span><span class="o">=</span><span class="nx">ocr_flag</span><span class="o">||</span><span class="kc">false</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="k">typeof</span> <span class="nx">obj</span><span class="o">===</span><span class="s2">&#34;undefined&#34;</span><span class="o">||</span><span class="o">!</span><span class="nx">obj</span><span class="o">||</span><span class="nx">obj</span><span class="o">===</span><span class="p">{</span><span class="p">}</span><span class="p">)</span><span class="p">{</span><span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="nx">fetch_params</span><span class="o">||</span><span class="o">!</span><span class="nx">fetch_params</span><span class="p">.</span><span class="nx">headers</span><span class="p">)</span><span class="p">{</span><span class="kd">let</span> <span class="nx">headers</span><span class="o">=</span><span class="p">{</span><span class="s2">&#34;User-Agent&#34;</span><span class="o">:</span><span class="nx">MOBILE_UA</span><span class="p">}</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">rule</span><span class="p">.</span><span class="nx">headers</span><span class="p">)</span><span class="p">{</span><span class="nb">Object</span><span class="p">.</span><span class="nx">assign</span><span class="p">(</span><span class="nx">headers</span><span class="p">,</span><span class="nx">rule</span><span class="p">.</span><span class="nx">headers</span><span class="p">)</span><span class="p">}</span><span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="nx">fetch_params</span><span class="p">)</span><span class="p">{</span><span class="nx">fetch_params</span><span class="o">=</span><span class="p">{</span><span class="p">}</span><span class="p">}</span><span class="nx">fetch_params</span><span class="p">.</span><span class="nx">headers</span><span class="o">=</span><span class="nx">headers</span><span class="p">}</span><span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="nx">fetch_params</span><span class="p">.</span><span class="nx">headers</span><span class="p">.</span><span class="nx">Referer</span><span class="p">)</span><span class="p">{</span><span class="nx">fetch_params</span><span class="p">.</span><span class="nx">headers</span><span class="p">.</span><span class="nx">Referer</span><span class="o">=</span><span class="nx">getHome</span><span class="p">(</span><span class="nx">url</span><span class="p">)</span><span class="p">}</span><span class="nx">obj</span><span class="o">=</span><span class="nx">fetch_params</span><span class="p">}</span><span class="k">else</span><span class="p">{</span><span class="kd">let</span> <span class="nx">headers</span><span class="o">=</span><span class="nx">obj</span><span class="p">.</span><span class="nx">headers</span><span class="o">||</span><span class="p">{</span><span class="p">}</span><span class="p">;</span><span class="kd">let</span> <span class="nx">keys</span><span class="o">=</span><span class="nb">Object</span><span class="p">.</span><span class="nx">keys</span><span class="p">(</span><span class="nx">headers</span><span class="p">)</span><span class="p">.</span><span class="nx">map</span><span class="p">(</span><span class="nx">it</span><span class="p">=&gt;</span><span class="nx">it</span><span class="p">.</span><span class="nx">toLowerCase</span><span class="p">(</span><span class="p">)</span><span class="p">)</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="nx">keys</span><span class="p">.</span><span class="nx">includes</span><span class="p">(</span><span class="s2">&#34;user-agent&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="nx">headers</span><span class="p">[</span><span class="s2">&#34;User-Agent&#34;</span><span class="p">]</span><span class="o">=</span><span class="nx">MOBILE_UA</span><span class="p">}</span><span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="nx">keys</span><span class="p">.</span><span class="nx">includes</span><span class="p">(</span><span class="s2">&#34;referer&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="nx">headers</span><span class="p">[</span><span class="s2">&#34;Referer&#34;</span><span class="p">]</span><span class="o">=</span><span class="nx">getHome</span><span class="p">(</span><span class="nx">url</span><span class="p">)</span><span class="p">}</span><span class="nx">obj</span><span class="p">.</span><span class="nx">headers</span><span class="o">=</span><span class="nx">headers</span><span class="p">}</span><span class="k">if</span><span class="p">(</span><span class="nx">rule</span><span class="p">.</span><span class="nx">encoding</span><span class="o">&amp;&amp;</span><span class="nx">rule</span><span class="p">.</span><span class="nx">encoding</span><span class="o">!==</span><span class="s2">&#34;utf-8&#34;</span><span class="o">&amp;&amp;</span><span class="o">!</span><span class="nx">ocr_flag</span><span class="p">)</span><span class="p">{</span><span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="nx">obj</span><span class="p">.</span><span class="nx">headers</span><span class="p">.</span><span class="nx">hasOwnProperty</span><span class="p">(</span><span class="s2">&#34;Content-Type&#34;</span><span class="p">)</span><span class="o">&amp;&amp;</span><span class="o">!</span><span class="nx">obj</span><span class="p">.</span><span class="nx">headers</span><span class="p">.</span><span class="nx">hasOwnProperty</span><span class="p">(</span><span class="s2">&#34;content-type&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="nx">obj</span><span class="p">.</span><span class="nx">headers</span><span class="p">[</span><span class="s2">&#34;Content-Type&#34;</span><span class="p">]</span><span class="o">=</span><span class="s2">&#34;text/html; charset=&#34;</span><span class="o">+</span><span class="nx">rule</span><span class="p">.</span><span class="nx">encoding</span><span class="p">}</span><span class="p">}</span><span class="k">if</span><span class="p">(</span><span class="k">typeof</span> <span class="nx">obj</span><span class="p">.</span><span class="nx">body</span><span class="o">!=</span><span class="s2">&#34;undefined&#34;</span><span class="o">&amp;&amp;</span><span class="nx">obj</span><span class="p">.</span><span class="nx">body</span><span class="o">&amp;&amp;</span><span class="k">typeof</span> <span class="nx">obj</span><span class="p">.</span><span class="nx">body</span><span class="o">===</span><span class="s2">&#34;string&#34;</span><span class="p">)</span><span class="p">{</span><span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="nx">obj</span><span class="p">.</span><span class="nx">headers</span><span class="p">.</span><span class="nx">hasOwnProperty</span><span class="p">(</span><span class="s2">&#34;Content-Type&#34;</span><span class="p">)</span><span class="o">&amp;&amp;</span><span class="o">!</span><span class="nx">obj</span><span class="p">.</span><span class="nx">headers</span><span class="p">.</span><span class="nx">hasOwnProperty</span><span class="p">(</span><span class="s2">&#34;content-type&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="nx">obj</span><span class="p">.</span><span class="nx">headers</span><span class="p">[</span><span class="s2">&#34;Content-Type&#34;</span><span class="p">]</span><span class="o">=</span><span class="s2">&#34;application/x-www-form-urlencoded; charset=&#34;</span><span class="o">+</span><span class="nx">rule</span><span class="p">.</span><span class="nx">encoding</span><span class="p">}</span><span class="p">}</span><span class="k">else</span> <span class="k">if</span><span class="p">(</span><span class="k">typeof</span> <span class="nx">obj</span><span class="p">.</span><span class="nx">body</span><span class="o">!=</span><span class="s2">&#34;undefined&#34;</span><span class="o">&amp;&amp;</span><span class="nx">obj</span><span class="p">.</span><span class="nx">body</span><span class="o">&amp;&amp;</span><span class="k">typeof</span> <span class="nx">obj</span><span class="p">.</span><span class="nx">body</span><span class="o">===</span><span class="s2">&#34;object&#34;</span><span class="p">)</span><span class="p">{</span><span class="nx">obj</span><span class="p">.</span><span class="nx">data</span><span class="o">=</span><span class="nx">obj</span><span class="p">.</span><span class="nx">body</span><span class="p">;</span><span class="k">delete</span> <span class="nx">obj</span><span class="p">.</span><span class="nx">body</span><span class="p">}</span><span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="nx">url</span><span class="p">)</span><span class="p">{</span><span class="k">return</span> <span class="nx">obj</span><span class="p">.</span><span class="nx">withHeaders</span><span class="o">?</span><span class="s2">&#34;{}&#34;</span><span class="o">:</span><span class="s2">&#34;&#34;</span><span class="p">}</span><span class="k">if</span><span class="p">(</span><span class="nx">obj</span><span class="p">.</span><span class="nx">toBase64</span><span class="p">)</span><span class="p">{</span><span class="nx">obj</span><span class="p">.</span><span class="nx">buffer</span><span class="o">=</span><span class="mi">2</span><span class="p">;</span><span class="k">delete</span> <span class="nx">obj</span><span class="p">.</span><span class="nx">toBase64</span><span class="p">}</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span><span class="nx">obj</span><span class="p">.</span><span class="nx">headers</span><span class="p">)</span><span class="p">)</span><span class="p">;</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="s2">&#34;request:&#34;</span><span class="o">+</span><span class="nx">url</span><span class="o">+</span><span class="sb">`</span><span class="sb">|method:</span><span class="si">${</span><span class="nx">obj</span><span class="p">.</span><span class="nx">method</span><span class="o">||</span><span class="s2">&#34;GET&#34;</span><span class="si">}</span><span class="sb">|body:</span><span class="si">${</span><span class="nx">obj</span><span class="p">.</span><span class="nx">body</span><span class="o">||</span><span class="s2">&#34;&#34;</span><span class="si">}</span><span class="sb">`</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">res</span><span class="o">=</span><span class="nx">req</span><span class="p">(</span><span class="nx">url</span><span class="p">,</span><span class="nx">obj</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">html</span><span class="o">=</span><span class="nx">res</span><span class="p">.</span><span class="nx">content</span><span class="o">||</span><span class="s2">&#34;&#34;</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">obj</span><span class="p">.</span><span class="nx">withHeaders</span><span class="p">)</span><span class="p">{</span><span class="kd">let</span> <span class="nx">htmlWithHeaders</span><span class="o">=</span><span class="nx">res</span><span class="p">.</span><span class="nx">headers</span><span class="p">;</span><span class="nx">htmlWithHeaders</span><span class="p">.</span><span class="nx">body</span><span class="o">=</span><span class="nx">html</span><span class="p">;</span><span class="k">return</span> <span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span><span class="nx">htmlWithHeaders</span><span class="p">)</span><span class="p">}</span><span class="k">else</span><span class="p">{</span><span class="k">return</span> <span class="nx">html</span><span class="p">}</span><span class="p">}</span><span class="kd">function</span> <span class="nx">post</span><span class="p">(</span><span class="nx">url</span><span class="p">,</span><span class="nx">obj</span><span class="p">)</span><span class="p">{</span><span class="nx">obj</span><span class="p">.</span><span class="nx">method</span><span class="o">=</span><span class="s2">&#34;POST&#34;</span><span class="p">;</span><span class="k">return</span> <span class="nx">request</span><span class="p">(</span><span class="nx">url</span><span class="p">,</span><span class="nx">obj</span><span class="p">)</span><span class="p">}</span><span class="nx">fetch</span><span class="o">=</span><span class="nx">request</span><span class="p">;</span><span class="nx">print</span><span class="o">=</span><span class="kd">function</span><span class="p">(</span><span class="nx">data</span><span class="p">)</span><span class="p">{</span><span class="nx">data</span><span class="o">=</span><span class="nx">data</span><span class="o">||</span><span class="s2">&#34;&#34;</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="k">typeof</span> <span class="nx">data</span><span class="o">==</span><span class="s2">&#34;object&#34;</span><span class="o">&amp;&amp;</span><span class="nb">Object</span><span class="p">.</span><span class="nx">keys</span><span class="p">(</span><span class="nx">data</span><span class="p">)</span><span class="p">.</span><span class="nx">length</span><span class="o">&gt;</span><span class="mi">0</span><span class="p">)</span><span class="p">{</span><span class="k">try</span><span class="p">{</span><span class="nx">data</span><span class="o">=</span><span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span><span class="nx">data</span><span class="p">)</span><span class="p">;</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">data</span><span class="p">)</span><span class="p">}</span><span class="k">catch</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span><span class="p">{</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="k">typeof</span> <span class="nx">data</span><span class="o">+</span><span class="s2">&#34;:&#34;</span><span class="o">+</span><span class="nx">data</span><span class="p">.</span><span class="nx">length</span><span class="p">)</span><span class="p">;</span><span class="k">return</span><span class="p">}</span><span class="p">}</span><span class="k">else</span> <span class="k">if</span><span class="p">(</span><span class="k">typeof</span> <span class="nx">data</span><span class="o">==</span><span class="s2">&#34;object&#34;</span><span class="o">&amp;&amp;</span><span class="nb">Object</span><span class="p">.</span><span class="nx">keys</span><span class="p">(</span><span class="nx">data</span><span class="p">)</span><span class="p">.</span><span class="nx">length</span><span class="o">&lt;</span><span class="mi">1</span><span class="p">)</span><span class="p">{</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="s2">&#34;null object&#34;</span><span class="p">)</span><span class="p">}</span><span class="k">else</span><span class="p">{</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">data</span><span class="p">)</span><span class="p">}</span><span class="p">}</span><span class="p">;</span><span class="nx">log</span><span class="o">=</span><span class="nx">print</span><span class="p">;</span><span class="kd">function</span> <span class="nx">checkHtml</span><span class="p">(</span><span class="nx">html</span><span class="p">,</span><span class="nx">url</span><span class="p">,</span><span class="nx">obj</span><span class="p">)</span><span class="p">{</span><span class="k">if</span><span class="p">(</span><span class="sr">/\?btwaf=/</span><span class="p">.</span><span class="nx">test</span><span class="p">(</span><span class="nx">html</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="kd">let</span> <span class="nx">btwaf</span><span class="o">=</span><span class="nx">html</span><span class="p">.</span><span class="nx">match</span><span class="p">(</span><span class="sr">/btwaf(.*?)&#34;/</span><span class="p">)</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="p">;</span><span class="nx">url</span><span class="o">=</span><span class="nx">url</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span><span class="s2">&#34;#&#34;</span><span class="p">)</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">+</span><span class="s2">&#34;?btwaf&#34;</span><span class="o">+</span><span class="nx">btwaf</span><span class="p">;</span><span class="nx">print</span><span class="p">(</span><span class="s2">&#34;宝塔验证访问链接:&#34;</span><span class="o">+</span><span class="nx">url</span><span class="p">)</span><span class="p">;</span><span class="nx">html</span><span class="o">=</span><span class="nx">request</span><span class="p">(</span><span class="nx">url</span><span class="p">,</span><span class="nx">obj</span><span class="p">)</span><span class="p">}</span><span class="k">return</span> <span class="nx">html</span><span class="p">}</span><span class="kd">function</span> <span class="nx">getCode</span><span class="p">(</span><span class="nx">url</span><span class="p">,</span><span class="nx">obj</span><span class="p">)</span><span class="p">{</span><span class="kd">let</span> <span class="nx">html</span><span class="o">=</span><span class="nx">request</span><span class="p">(</span><span class="nx">url</span><span class="p">,</span><span class="nx">obj</span><span class="p">)</span><span class="p">;</span><span class="nx">html</span><span class="o">=</span><span class="nx">checkHtml</span><span class="p">(</span><span class="nx">html</span><span class="p">,</span><span class="nx">url</span><span class="p">,</span><span class="nx">obj</span><span class="p">)</span><span class="p">;</span><span class="k">return</span> <span class="nx">html</span><span class="p">}</span><span class="kd">function</span> <span class="nx">getHtml</span><span class="p">(</span><span class="nx">url</span><span class="p">)</span><span class="p">{</span><span class="kd">let</span> <span class="nx">obj</span><span class="o">=</span><span class="p">{</span><span class="p">}</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">rule</span><span class="p">.</span><span class="nx">headers</span><span class="p">)</span><span class="p">{</span><span class="nx">obj</span><span class="p">.</span><span class="nx">headers</span><span class="o">=</span><span class="nx">rule</span><span class="p">.</span><span class="nx">headers</span><span class="p">}</span><span class="kd">let</span> <span class="nx">cookie</span><span class="o">=</span><span class="nx">getItem</span><span class="p">(</span><span class="nx">RULE_CK</span><span class="p">,</span><span class="s2">&#34;&#34;</span><span class="p">)</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">cookie</span><span class="p">)</span><span class="p">{</span><span class="k">if</span><span class="p">(</span><span class="nx">obj</span><span class="p">.</span><span class="nx">headers</span><span class="o">&amp;&amp;</span><span class="o">!</span><span class="nb">Object</span><span class="p">.</span><span class="nx">keys</span><span class="p">(</span><span class="nx">obj</span><span class="p">.</span><span class="nx">headers</span><span class="p">)</span><span class="p">.</span><span class="nx">map</span><span class="p">(</span><span class="nx">it</span><span class="p">=&gt;</span><span class="nx">it</span><span class="p">.</span><span class="nx">toLowerCase</span><span class="p">(</span><span class="p">)</span><span class="p">)</span><span class="p">.</span><span class="nx">includes</span><span class="p">(</span><span class="s2">&#34;cookie&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="nx">log</span><span class="p">(</span><span class="s2">&#34;历史无cookie,新增过验证后的cookie&#34;</span><span class="p">)</span><span class="p">;</span><span class="nx">obj</span><span class="p">.</span><span class="nx">headers</span><span class="p">[</span><span class="s2">&#34;Cookie&#34;</span><span class="p">]</span><span class="o">=</span><span class="nx">cookie</span><span class="p">}</span><span class="k">else</span> <span class="k">if</span><span class="p">(</span><span class="nx">obj</span><span class="p">.</span><span class="nx">headers</span><span class="o">&amp;&amp;</span><span class="nx">obj</span><span class="p">.</span><span class="nx">headers</span><span class="p">.</span><span class="nx">cookie</span><span class="o">&amp;&amp;</span><span class="nx">obj</span><span class="p">.</span><span class="nx">headers</span><span class="p">.</span><span class="nx">cookie</span><span class="o">!==</span><span class="nx">cookie</span><span class="p">)</span><span class="p">{</span><span class="nx">obj</span><span class="p">.</span><span class="nx">headers</span><span class="p">[</span><span class="s2">&#34;Cookie&#34;</span><span class="p">]</span><span class="o">=</span><span class="nx">cookie</span><span class="p">;</span><span class="nx">log</span><span class="p">(</span><span class="s2">&#34;历史有小写过期的cookie,更新过验证后的cookie&#34;</span><span class="p">)</span><span class="p">}</span><span class="k">else</span> <span class="k">if</span><span class="p">(</span><span class="nx">obj</span><span class="p">.</span><span class="nx">headers</span><span class="o">&amp;&amp;</span><span class="nx">obj</span><span class="p">.</span><span class="nx">headers</span><span class="p">.</span><span class="nx">Cookie</span><span class="o">&amp;&amp;</span><span class="nx">obj</span><span class="p">.</span><span class="nx">headers</span><span class="p">.</span><span class="nx">Cookie</span><span class="o">!==</span><span class="nx">cookie</span><span class="p">)</span><span class="p">{</span><span class="nx">obj</span><span class="p">.</span><span class="nx">headers</span><span class="p">[</span><span class="s2">&#34;Cookie&#34;</span><span class="p">]</span><span class="o">=</span><span class="nx">cookie</span><span class="p">;</span><span class="nx">log</span><span class="p">(</span><span class="s2">&#34;历史有大写过期的cookie,更新过验证后的cookie&#34;</span><span class="p">)</span><span class="p">}</span><span class="k">else</span> <span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="nx">obj</span><span class="p">.</span><span class="nx">headers</span><span class="p">)</span><span class="p">{</span><span class="nx">obj</span><span class="p">.</span><span class="nx">headers</span><span class="o">=</span><span class="p">{</span><span class="nx">Cookie</span><span class="o">:</span><span class="nx">cookie</span><span class="p">}</span><span class="p">;</span><span class="nx">log</span><span class="p">(</span><span class="s2">&#34;历史无headers,更新过验证后的含cookie的headers&#34;</span><span class="p">)</span><span class="p">}</span><span class="p">}</span><span class="kd">let</span> <span class="nx">html</span><span class="o">=</span><span class="nx">getCode</span><span class="p">(</span><span class="nx">url</span><span class="p">,</span><span class="nx">obj</span><span class="p">)</span><span class="p">;</span><span class="k">return</span> <span class="nx">html</span><span class="p">}</span><span class="kd">function</span> <span class="nx">homeParse</span><span class="p">(</span><span class="nx">homeObj</span><span class="p">)</span><span class="p">{</span><span class="nx">fetch_params</span><span class="o">=</span><span class="nx">JSON</span><span class="p">.</span><span class="nx">parse</span><span class="p">(</span><span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span><span class="nx">rule_fetch_params</span><span class="p">)</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">classes</span><span class="o">=</span><span class="p">[</span><span class="p">]</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">homeObj</span><span class="p">.</span><span class="nx">class_name</span><span class="o">&amp;&amp;</span><span class="nx">homeObj</span><span class="p">.</span><span class="nx">class_url</span><span class="p">)</span><span class="p">{</span><span class="kd">let</span> <span class="nx">names</span><span class="o">=</span><span class="nx">homeObj</span><span class="p">.</span><span class="nx">class_name</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span><span class="s2">&#34;&amp;&#34;</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">urls</span><span class="o">=</span><span class="nx">homeObj</span><span class="p">.</span><span class="nx">class_url</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span><span class="s2">&#34;&amp;&#34;</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">cnt</span><span class="o">=</span><span class="nb">Math</span><span class="p">.</span><span class="nx">min</span><span class="p">(</span><span class="nx">names</span><span class="p">.</span><span class="nx">length</span><span class="p">,</span><span class="nx">urls</span><span class="p">.</span><span class="nx">length</span><span class="p">)</span><span class="p">;</span><span class="k">for</span><span class="p">(</span><span class="kd">let</span> <span class="nx">i</span><span class="o">=</span><span class="mi">0</span><span class="p">;</span><span class="nx">i</span><span class="o">&lt;</span><span class="nx">cnt</span><span class="p">;</span><span class="nx">i</span><span class="o">++</span><span class="p">)</span><span class="p">{</span><span class="nx">classes</span><span class="p">.</span><span class="nx">push</span><span class="p">(</span><span class="p">{</span><span class="nx">type_id</span><span class="o">:</span><span class="nx">urls</span><span class="p">[</span><span class="nx">i</span><span class="p">]</span><span class="p">,</span><span class="nx">type_name</span><span class="o">:</span><span class="nx">names</span><span class="p">[</span><span class="nx">i</span><span class="p">]</span><span class="p">}</span><span class="p">)</span><span class="p">}</span><span class="p">}</span><span class="k">if</span><span class="p">(</span><span class="nx">homeObj</span><span class="p">.</span><span class="nx">class_parse</span><span class="p">)</span><span class="p">{</span><span class="kd">let</span> <span class="nx">p</span><span class="o">=</span><span class="nx">homeObj</span><span class="p">.</span><span class="nx">class_parse</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span><span class="s2">&#34;;&#34;</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">_ps</span><span class="o">=</span><span class="nx">parseTags</span><span class="p">.</span><span class="nx">getParse</span><span class="p">(</span><span class="nx">p</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="p">)</span><span class="p">;</span><span class="nx">_pdfa</span><span class="o">=</span><span class="nx">_ps</span><span class="p">.</span><span class="nx">pdfa</span><span class="p">;</span><span class="nx">_pdfh</span><span class="o">=</span><span class="nx">_ps</span><span class="p">.</span><span class="nx">pdfh</span><span class="p">;</span><span class="nx">_pd</span><span class="o">=</span><span class="nx">_ps</span><span class="p">.</span><span class="nx">pd</span><span class="p">;</span><span class="nx">MY_URL</span><span class="o">=</span><span class="nx">rule</span><span class="p">.</span><span class="nx">url</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">p</span><span class="p">.</span><span class="nx">length</span><span class="o">&gt;=</span><span class="mi">3</span><span class="p">)</span><span class="p">{</span><span class="k">try</span><span class="p">{</span><span class="kd">let</span> <span class="nx">html</span><span class="o">=</span><span class="nx">getHtml</span><span class="p">(</span><span class="nx">homeObj</span><span class="p">.</span><span class="nx">MY_URL</span><span class="p">)</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">html</span><span class="p">)</span><span class="p">{</span><span class="nx">homeHtmlCache</span><span class="o">=</span><span class="nx">html</span><span class="p">;</span><span class="kd">let</span> <span class="nx">list</span><span class="o">=</span><span class="nx">_pdfa</span><span class="p">(</span><span class="nx">html</span><span class="p">,</span><span class="nx">p</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="p">)</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">list</span><span class="o">&amp;&amp;</span><span class="nx">list</span><span class="p">.</span><span class="nx">length</span><span class="o">&gt;</span><span class="mi">0</span><span class="p">)</span><span class="p">{</span><span class="nx">list</span><span class="p">.</span><span class="nx">forEach</span><span class="p">(</span><span class="p">(</span><span class="nx">it</span><span class="p">,</span><span class="nx">idex</span><span class="p">)</span><span class="p">=&gt;</span><span class="p">{</span><span class="k">try</span><span class="p">{</span><span class="kd">let</span> <span class="nx">name</span><span class="o">=</span><span class="nx">_pdfh</span><span class="p">(</span><span class="nx">it</span><span class="p">,</span><span class="nx">p</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="p">)</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">homeObj</span><span class="p">.</span><span class="nx">cate_exclude</span><span class="o">&amp;&amp;</span><span class="k">new</span> <span class="nb">RegExp</span><span class="p">(</span><span class="nx">homeObj</span><span class="p">.</span><span class="nx">cate_exclude</span><span class="p">)</span><span class="p">.</span><span class="nx">test</span><span class="p">(</span><span class="nx">name</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="k">return</span><span class="p">}</span><span class="kd">let</span> <span class="nx">url</span><span class="o">=</span><span class="nx">_pd</span><span class="p">(</span><span class="nx">it</span><span class="p">,</span><span class="nx">p</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span><span class="p">)</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">p</span><span class="p">.</span><span class="nx">length</span><span class="o">&gt;</span><span class="mi">3</span><span class="o">&amp;&amp;</span><span class="nx">p</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span><span class="p">)</span><span class="p">{</span><span class="kd">let</span> <span class="nx">exp</span><span class="o">=</span><span class="k">new</span> <span class="nb">RegExp</span><span class="p">(</span><span class="nx">p</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span><span class="p">)</span><span class="p">;</span><span class="nx">url</span><span class="o">=</span><span class="nx">url</span><span class="p">.</span><span class="nx">match</span><span class="p">(</span><span class="nx">exp</span><span class="p">)</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="p">}</span><span class="nx">classes</span><span class="p">.</span><span class="nx">push</span><span class="p">(</span><span class="p">{</span><span class="nx">type_id</span><span class="o">:</span><span class="nx">url</span><span class="p">.</span><span class="nx">trim</span><span class="p">(</span><span class="p">)</span><span class="p">,</span><span class="nx">type_name</span><span class="o">:</span><span class="nx">name</span><span class="p">.</span><span class="nx">trim</span><span class="p">(</span><span class="p">)</span><span class="p">}</span><span class="p">)</span><span class="p">}</span><span class="k">catch</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span><span class="p">{</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="sb">`</span><span class="sb">分类列表定位第</span><span class="si">${</span><span class="nx">idex</span><span class="si">}</span><span class="sb">个元素正常报错:</span><span class="si">${</span><span class="nx">e</span><span class="p">.</span><span class="nx">message</span><span class="si">}</span><span class="sb">`</span><span class="p">)</span><span class="p">}</span><span class="p">}</span><span class="p">)</span><span class="p">}</span><span class="p">}</span><span class="p">}</span><span class="k">catch</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span><span class="p">{</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">e</span><span class="p">.</span><span class="nx">message</span><span class="p">)</span><span class="p">}</span><span class="p">}</span><span class="p">}</span><span class="nx">classes</span><span class="o">=</span><span class="nx">classes</span><span class="p">.</span><span class="nx">filter</span><span class="p">(</span><span class="nx">it</span><span class="p">=&gt;</span><span class="o">!</span><span class="nx">homeObj</span><span class="p">.</span><span class="nx">cate_exclude</span><span class="o">||</span><span class="o">!</span><span class="k">new</span> <span class="nb">RegExp</span><span class="p">(</span><span class="nx">homeObj</span><span class="p">.</span><span class="nx">cate_exclude</span><span class="p">)</span><span class="p">.</span><span class="nx">test</span><span class="p">(</span><span class="nx">it</span><span class="p">.</span><span class="nx">type_name</span><span class="p">)</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">resp</span><span class="o">=</span><span class="p">{</span><span class="kr">class</span><span class="o">:</span><span class="nx">classes</span><span class="p">}</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">homeObj</span><span class="p">.</span><span class="nx">filter</span><span class="p">)</span><span class="p">{</span><span class="nx">resp</span><span class="p">.</span><span class="nx">filters</span><span class="o">=</span><span class="nx">homeObj</span><span class="p">.</span><span class="nx">filter</span><span class="p">}</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span><span class="nx">resp</span><span class="p">)</span><span class="p">)</span><span class="p">;</span><span class="k">return</span> <span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span><span class="nx">resp</span><span class="p">)</span><span class="p">}</span><span class="kd">function</span> <span class="nx">getPP</span><span class="p">(</span><span class="nx">p</span><span class="p">,</span><span class="nx">pn</span><span class="p">,</span><span class="nx">pp</span><span class="p">,</span><span class="nx">ppn</span><span class="p">)</span><span class="p">{</span><span class="k">try</span><span class="p">{</span><span class="kd">let</span> <span class="nx">ps</span><span class="o">=</span><span class="nx">p</span><span class="p">[</span><span class="nx">pn</span><span class="p">]</span><span class="o">===</span><span class="s2">&#34;*&#34;</span><span class="o">&amp;&amp;</span><span class="nx">pp</span><span class="p">.</span><span class="nx">length</span><span class="o">&gt;</span><span class="nx">ppn</span><span class="o">?</span><span class="nx">pp</span><span class="p">[</span><span class="nx">ppn</span><span class="p">]</span><span class="o">:</span><span class="nx">p</span><span class="p">[</span><span class="nx">pn</span><span class="p">]</span><span class="p">;</span><span class="k">return</span> <span class="nx">ps</span><span class="p">}</span><span class="k">catch</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span><span class="p">{</span><span class="k">return</span><span class="s2">&#34;&#34;</span><span class="p">}</span><span class="p">}</span><span class="kd">function</span> <span class="nx">homeVodParse</span><span class="p">(</span><span class="nx">homeVodObj</span><span class="p">)</span><span class="p">{</span><span class="nx">fetch_params</span><span class="o">=</span><span class="nx">JSON</span><span class="p">.</span><span class="nx">parse</span><span class="p">(</span><span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span><span class="nx">rule_fetch_params</span><span class="p">)</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">d</span><span class="o">=</span><span class="p">[</span><span class="p">]</span><span class="p">;</span><span class="nx">MY_URL</span><span class="o">=</span><span class="nx">homeVodObj</span><span class="p">.</span><span class="nx">homeUrl</span><span class="p">;</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">MY_URL</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">t1</span><span class="o">=</span><span class="p">(</span><span class="k">new</span> <span class="nb">Date</span><span class="p">)</span><span class="p">.</span><span class="nx">getTime</span><span class="p">(</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">p</span><span class="o">=</span><span class="nx">homeVodObj</span><span class="p">.</span><span class="nx">推荐</span><span class="p">;</span><span class="nx">print</span><span class="p">(</span><span class="s2">&#34;p:&#34;</span><span class="o">+</span><span class="nx">p</span><span class="p">)</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">p</span><span class="o">===</span><span class="s2">&#34;*&#34;</span><span class="o">&amp;&amp;</span><span class="nx">rule</span><span class="p">.</span><span class="nx">一级</span><span class="p">)</span><span class="p">{</span><span class="nx">p</span><span class="o">=</span><span class="nx">rule</span><span class="p">.</span><span class="nx">一级</span><span class="p">;</span><span class="nx">homeVodObj</span><span class="p">.</span><span class="kr">double</span><span class="o">=</span><span class="kc">false</span><span class="p">}</span><span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="nx">p</span><span class="o">||</span><span class="k">typeof</span> <span class="nx">p</span><span class="o">!==</span><span class="s2">&#34;string&#34;</span><span class="p">)</span><span class="p">{</span><span class="k">return</span><span class="s2">&#34;{}&#34;</span><span class="p">}</span><span class="nx">p</span><span class="o">=</span><span class="nx">p</span><span class="p">.</span><span class="nx">trim</span><span class="p">(</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">pp</span><span class="o">=</span><span class="nx">rule</span><span class="p">.</span><span class="nx">一级</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span><span class="s2">&#34;;&#34;</span><span class="p">)</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">p</span><span class="p">.</span><span class="nx">startsWith</span><span class="p">(</span><span class="s2">&#34;js:&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="kr">const</span> <span class="nx">TYPE</span><span class="o">=</span><span class="s2">&#34;home&#34;</span><span class="p">;</span><span class="kd">var</span> <span class="nx">input</span><span class="o">=</span><span class="nx">MY_URL</span><span class="p">;</span><span class="nx">HOST</span><span class="o">=</span><span class="nx">rule</span><span class="p">.</span><span class="nx">host</span><span class="p">;</span><span class="nb">eval</span><span class="p">(</span><span class="nx">p</span><span class="p">.</span><span class="nx">replace</span><span class="p">(</span><span class="s2">&#34;js:&#34;</span><span class="p">,</span><span class="s2">&#34;&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">;</span><span class="nx">d</span><span class="o">=</span><span class="nx">VODS</span><span class="p">}</span><span class="k">else</span><span class="p">{</span><span class="nx">p</span><span class="o">=</span><span class="nx">p</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span><span class="s2">&#34;;&#34;</span><span class="p">)</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="nx">homeVodObj</span><span class="p">.</span><span class="kr">double</span><span class="o">&amp;&amp;</span><span class="nx">p</span><span class="p">.</span><span class="nx">length</span><span class="o">&lt;</span><span class="mi">5</span><span class="p">)</span><span class="p">{</span><span class="k">return</span><span class="s2">&#34;{}&#34;</span><span class="p">}</span><span class="k">else</span> <span class="k">if</span><span class="p">(</span><span class="nx">homeVodObj</span><span class="p">.</span><span class="kr">double</span><span class="o">&amp;&amp;</span><span class="nx">p</span><span class="p">.</span><span class="nx">length</span><span class="o">&lt;</span><span class="mi">6</span><span class="p">)</span><span class="p">{</span><span class="k">return</span><span class="s2">&#34;{}&#34;</span><span class="p">}</span><span class="kd">let</span> <span class="nx">p0</span><span class="o">=</span><span class="nx">getPP</span><span class="p">(</span><span class="nx">p</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="nx">pp</span><span class="p">,</span><span class="mi">0</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">_ps</span><span class="o">=</span><span class="nx">parseTags</span><span class="p">.</span><span class="nx">getParse</span><span class="p">(</span><span class="nx">p0</span><span class="p">)</span><span class="p">;</span><span class="nx">_pdfa</span><span class="o">=</span><span class="nx">_ps</span><span class="p">.</span><span class="nx">pdfa</span><span class="p">;</span><span class="nx">_pdfh</span><span class="o">=</span><span class="nx">_ps</span><span class="p">.</span><span class="nx">pdfh</span><span class="p">;</span><span class="nx">_pd</span><span class="o">=</span><span class="nx">_ps</span><span class="p">.</span><span class="nx">pd</span><span class="p">;</span><span class="kd">let</span> <span class="nx">is_json</span><span class="o">=</span><span class="nx">p0</span><span class="p">.</span><span class="nx">startsWith</span><span class="p">(</span><span class="s2">&#34;json:&#34;</span><span class="p">)</span><span class="p">;</span><span class="nx">p0</span><span class="o">=</span><span class="nx">p0</span><span class="p">.</span><span class="nx">replace</span><span class="p">(</span><span class="sr">/^(jsp:|json:|jq:)/</span><span class="p">,</span><span class="s2">&#34;&#34;</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">html</span><span class="o">=</span><span class="nx">homeHtmlCache</span><span class="o">||</span><span class="nx">getHtml</span><span class="p">(</span><span class="nx">MY_URL</span><span class="p">)</span><span class="p">;</span><span class="nx">homeHtmlCache</span><span class="o">=</span><span class="kc">undefined</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">is_json</span><span class="p">)</span><span class="p">{</span><span class="nx">html</span><span class="o">=</span><span class="nx">dealJson</span><span class="p">(</span><span class="nx">html</span><span class="p">)</span><span class="p">}</span><span class="k">try</span><span class="p">{</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="s2">&#34;double:&#34;</span><span class="o">+</span><span class="nx">homeVodObj</span><span class="p">.</span><span class="kr">double</span><span class="p">)</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">homeVodObj</span><span class="p">.</span><span class="kr">double</span><span class="p">)</span><span class="p">{</span><span class="kd">let</span> <span class="nx">items</span><span class="o">=</span><span class="nx">_pdfa</span><span class="p">(</span><span class="nx">html</span><span class="p">,</span><span class="nx">p0</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">p1</span><span class="o">=</span><span class="nx">getPP</span><span class="p">(</span><span class="nx">p</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="nx">pp</span><span class="p">,</span><span class="mi">0</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">p2</span><span class="o">=</span><span class="nx">getPP</span><span class="p">(</span><span class="nx">p</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="nx">pp</span><span class="p">,</span><span class="mi">1</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">p3</span><span class="o">=</span><span class="nx">getPP</span><span class="p">(</span><span class="nx">p</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="nx">pp</span><span class="p">,</span><span class="mi">2</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">p4</span><span class="o">=</span><span class="nx">getPP</span><span class="p">(</span><span class="nx">p</span><span class="p">,</span><span class="mi">4</span><span class="p">,</span><span class="nx">pp</span><span class="p">,</span><span class="mi">3</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">p5</span><span class="o">=</span><span class="nx">getPP</span><span class="p">(</span><span class="nx">p</span><span class="p">,</span><span class="mi">5</span><span class="p">,</span><span class="nx">pp</span><span class="p">,</span><span class="mi">4</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">p6</span><span class="o">=</span><span class="nx">getPP</span><span class="p">(</span><span class="nx">p</span><span class="p">,</span><span class="mi">6</span><span class="p">,</span><span class="nx">pp</span><span class="p">,</span><span class="mi">5</span><span class="p">)</span><span class="p">;</span><span class="k">for</span><span class="p">(</span><span class="kd">let</span> <span class="nx">item</span> <span class="k">of</span> <span class="nx">items</span><span class="p">)</span><span class="p">{</span><span class="kd">let</span> <span class="nx">items2</span><span class="o">=</span><span class="nx">_pdfa</span><span class="p">(</span><span class="nx">item</span><span class="p">,</span><span class="nx">p1</span><span class="p">)</span><span class="p">;</span><span class="k">for</span><span class="p">(</span><span class="kd">let</span> <span class="nx">item2</span> <span class="k">of</span> <span class="nx">items2</span><span class="p">)</span><span class="p">{</span><span class="k">try</span><span class="p">{</span><span class="kd">let</span> <span class="nx">title</span><span class="o">=</span><span class="nx">_pdfh</span><span class="p">(</span><span class="nx">item2</span><span class="p">,</span><span class="nx">p2</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">img</span><span class="o">=</span><span class="s2">&#34;&#34;</span><span class="p">;</span><span class="k">try</span><span class="p">{</span><span class="nx">img</span><span class="o">=</span><span class="nx">_pd</span><span class="p">(</span><span class="nx">item2</span><span class="p">,</span><span class="nx">p3</span><span class="p">)</span><span class="p">}</span><span class="k">catch</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span><span class="p">{</span><span class="p">}</span><span class="kd">let</span> <span class="nx">desc</span><span class="o">=</span><span class="s2">&#34;&#34;</span><span class="p">;</span><span class="k">try</span><span class="p">{</span><span class="nx">desc</span><span class="o">=</span><span class="nx">_pdfh</span><span class="p">(</span><span class="nx">item2</span><span class="p">,</span><span class="nx">p4</span><span class="p">)</span><span class="p">}</span><span class="k">catch</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span><span class="p">{</span><span class="p">}</span><span class="kd">let</span> <span class="nx">links</span><span class="o">=</span><span class="p">[</span><span class="p">]</span><span class="p">;</span><span class="k">for</span><span class="p">(</span><span class="kd">let</span> <span class="nx">_p5</span> <span class="k">of</span> <span class="nx">p5</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span><span class="s2">&#34;+&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="kd">let</span> <span class="nx">link</span><span class="o">=</span><span class="o">!</span><span class="nx">homeVodObj</span><span class="p">.</span><span class="nx">detailUrl</span><span class="o">?</span><span class="nx">_pd</span><span class="p">(</span><span class="nx">item2</span><span class="p">,</span><span class="nx">_p5</span><span class="p">,</span><span class="nx">MY_URL</span><span class="p">)</span><span class="o">:</span><span class="nx">_pdfh</span><span class="p">(</span><span class="nx">item2</span><span class="p">,</span><span class="nx">_p5</span><span class="p">)</span><span class="p">;</span><span class="nx">links</span><span class="p">.</span><span class="nx">push</span><span class="p">(</span><span class="nx">link</span><span class="p">)</span><span class="p">}</span><span class="kd">let</span> <span class="nx">content</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">p</span><span class="p">.</span><span class="nx">length</span><span class="o">&gt;</span><span class="mi">6</span><span class="o">&amp;&amp;</span><span class="nx">p</span><span class="p">[</span><span class="mi">6</span><span class="p">]</span><span class="p">)</span><span class="p">{</span><span class="nx">content</span><span class="o">=</span><span class="nx">_pdfh</span><span class="p">(</span><span class="nx">item2</span><span class="p">,</span><span class="nx">p6</span><span class="p">)</span><span class="p">}</span><span class="k">else</span><span class="p">{</span><span class="nx">content</span><span class="o">=</span><span class="s2">&#34;&#34;</span><span class="p">}</span><span class="kd">let</span> <span class="nx">vid</span><span class="o">=</span><span class="nx">links</span><span class="p">.</span><span class="nx">join</span><span class="p">(</span><span class="s2">&#34;$&#34;</span><span class="p">)</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">rule</span><span class="p">.</span><span class="nx">二级</span><span class="o">===</span><span class="s2">&#34;*&#34;</span><span class="p">)</span><span class="p">{</span><span class="nx">vid</span><span class="o">=</span><span class="nx">vid</span><span class="o">+</span><span class="s2">&#34;@@&#34;</span><span class="o">+</span><span class="nx">title</span><span class="o">+</span><span class="s2">&#34;@@&#34;</span><span class="o">+</span><span class="nx">img</span><span class="p">}</span><span class="kd">let</span> <span class="nx">vod</span><span class="o">=</span><span class="p">{</span><span class="nx">vod_name</span><span class="o">:</span><span class="nx">title</span><span class="p">,</span><span class="nx">vod_pic</span><span class="o">:</span><span class="nx">img</span><span class="p">,</span><span class="nx">vod_remarks</span><span class="o">:</span><span class="nx">desc</span><span class="p">,</span><span class="nx">vod_content</span><span class="o">:</span><span class="nx">content</span><span class="p">,</span><span class="nx">vod_id</span><span class="o">:</span><span class="nx">vid</span><span class="p">}</span><span class="p">;</span><span class="nx">d</span><span class="p">.</span><span class="nx">push</span><span class="p">(</span><span class="nx">vod</span><span class="p">)</span><span class="p">}</span><span class="k">catch</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span><span class="p">{</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="s2">&#34;首页列表双层定位处理发生错误:&#34;</span><span class="o">+</span><span class="nx">e</span><span class="p">.</span><span class="nx">message</span><span class="p">)</span><span class="p">}</span><span class="p">}</span><span class="p">}</span><span class="p">}</span><span class="k">else</span><span class="p">{</span><span class="kd">let</span> <span class="nx">items</span><span class="o">=</span><span class="nx">_pdfa</span><span class="p">(</span><span class="nx">html</span><span class="p">,</span><span class="nx">p0</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">p1</span><span class="o">=</span><span class="nx">getPP</span><span class="p">(</span><span class="nx">p</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="nx">pp</span><span class="p">,</span><span class="mi">1</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">p2</span><span class="o">=</span><span class="nx">getPP</span><span class="p">(</span><span class="nx">p</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="nx">pp</span><span class="p">,</span><span class="mi">2</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">p3</span><span class="o">=</span><span class="nx">getPP</span><span class="p">(</span><span class="nx">p</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="nx">pp</span><span class="p">,</span><span class="mi">3</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">p4</span><span class="o">=</span><span class="nx">getPP</span><span class="p">(</span><span class="nx">p</span><span class="p">,</span><span class="mi">4</span><span class="p">,</span><span class="nx">pp</span><span class="p">,</span><span class="mi">4</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">p5</span><span class="o">=</span><span class="nx">getPP</span><span class="p">(</span><span class="nx">p</span><span class="p">,</span><span class="mi">5</span><span class="p">,</span><span class="nx">pp</span><span class="p">,</span><span class="mi">5</span><span class="p">)</span><span class="p">;</span><span class="k">for</span><span class="p">(</span><span class="kd">let</span> <span class="nx">item</span> <span class="k">of</span> <span class="nx">items</span><span class="p">)</span><span class="p">{</span><span class="k">try</span><span class="p">{</span><span class="kd">let</span> <span class="nx">title</span><span class="o">=</span><span class="nx">_pdfh</span><span class="p">(</span><span class="nx">item</span><span class="p">,</span><span class="nx">p1</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">img</span><span class="o">=</span><span class="s2">&#34;&#34;</span><span class="p">;</span><span class="k">try</span><span class="p">{</span><span class="nx">img</span><span class="o">=</span><span class="nx">_pd</span><span class="p">(</span><span class="nx">item</span><span class="p">,</span><span class="nx">p2</span><span class="p">,</span><span class="nx">MY_URL</span><span class="p">)</span><span class="p">}</span><span class="k">catch</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span><span class="p">{</span><span class="p">}</span><span class="kd">let</span> <span class="nx">desc</span><span class="o">=</span><span class="s2">&#34;&#34;</span><span class="p">;</span><span class="k">try</span><span class="p">{</span><span class="nx">desc</span><span class="o">=</span><span class="nx">_pdfh</span><span class="p">(</span><span class="nx">item</span><span class="p">,</span><span class="nx">p3</span><span class="p">)</span><span class="p">}</span><span class="k">catch</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span><span class="p">{</span><span class="p">}</span><span class="kd">let</span> <span class="nx">links</span><span class="o">=</span><span class="p">[</span><span class="p">]</span><span class="p">;</span><span class="k">for</span><span class="p">(</span><span class="kd">let</span> <span class="nx">_p5</span> <span class="k">of</span> <span class="nx">p4</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span><span class="s2">&#34;+&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="kd">let</span> <span class="nx">link</span><span class="o">=</span><span class="o">!</span><span class="nx">homeVodObj</span><span class="p">.</span><span class="nx">detailUrl</span><span class="o">?</span><span class="nx">_pd</span><span class="p">(</span><span class="nx">item</span><span class="p">,</span><span class="nx">_p5</span><span class="p">,</span><span class="nx">MY_URL</span><span class="p">)</span><span class="o">:</span><span class="nx">_pdfh</span><span class="p">(</span><span class="nx">item</span><span class="p">,</span><span class="nx">_p5</span><span class="p">)</span><span class="p">;</span><span class="nx">links</span><span class="p">.</span><span class="nx">push</span><span class="p">(</span><span class="nx">link</span><span class="p">)</span><span class="p">}</span><span class="kd">let</span> <span class="nx">content</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">p</span><span class="p">.</span><span class="nx">length</span><span class="o">&gt;</span><span class="mi">5</span><span class="o">&amp;&amp;</span><span class="nx">p</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span><span class="p">)</span><span class="p">{</span><span class="nx">content</span><span class="o">=</span><span class="nx">_pdfh</span><span class="p">(</span><span class="nx">item</span><span class="p">,</span><span class="nx">p5</span><span class="p">)</span><span class="p">}</span><span class="k">else</span><span class="p">{</span><span class="nx">content</span><span class="o">=</span><span class="s2">&#34;&#34;</span><span class="p">}</span><span class="kd">let</span> <span class="nx">vid</span><span class="o">=</span><span class="nx">links</span><span class="p">.</span><span class="nx">join</span><span class="p">(</span><span class="s2">&#34;$&#34;</span><span class="p">)</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">rule</span><span class="p">.</span><span class="nx">二级</span><span class="o">===</span><span class="s2">&#34;*&#34;</span><span class="p">)</span><span class="p">{</span><span class="nx">vid</span><span class="o">=</span><span class="nx">vid</span><span class="o">+</span><span class="s2">&#34;@@&#34;</span><span class="o">+</span><span class="nx">title</span><span class="o">+</span><span class="s2">&#34;@@&#34;</span><span class="o">+</span><span class="nx">img</span><span class="p">}</span><span class="kd">let</span> <span class="nx">vod</span><span class="o">=</span><span class="p">{</span><span class="nx">vod_name</span><span class="o">:</span><span class="nx">title</span><span class="p">,</span><span class="nx">vod_pic</span><span class="o">:</span><span class="nx">img</span><span class="p">,</span><span class="nx">vod_remarks</span><span class="o">:</span><span class="nx">desc</span><span class="p">,</span><span class="nx">vod_content</span><span class="o">:</span><span class="nx">content</span><span class="p">,</span><span class="nx">vod_id</span><span class="o">:</span><span class="nx">vid</span><span class="p">}</span><span class="p">;</span><span class="nx">d</span><span class="p">.</span><span class="nx">push</span><span class="p">(</span><span class="nx">vod</span><span class="p">)</span><span class="p">}</span><span class="k">catch</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span><span class="p">{</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="s2">&#34;首页列表单层定位处理发生错误:&#34;</span><span class="o">+</span><span class="nx">e</span><span class="p">.</span><span class="nx">message</span><span class="p">)</span><span class="p">}</span><span class="p">}</span><span class="p">}</span><span class="p">}</span><span class="k">catch</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span><span class="p">{</span><span class="p">}</span><span class="p">}</span><span class="kd">let</span> <span class="nx">t2</span><span class="o">=</span><span class="p">(</span><span class="k">new</span> <span class="nb">Date</span><span class="p">)</span><span class="p">.</span><span class="nx">getTime</span><span class="p">(</span><span class="p">)</span><span class="p">;</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="s2">&#34;加载首页推荐耗时:&#34;</span><span class="o">+</span><span class="p">(</span><span class="nx">t2</span><span class="o">-</span><span class="nx">t1</span><span class="p">)</span><span class="o">+</span><span class="s2">&#34;毫秒&#34;</span><span class="p">)</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">rule</span><span class="p">.</span><span class="nx">图片来源</span><span class="p">)</span><span class="p">{</span><span class="nx">d</span><span class="p">.</span><span class="nx">forEach</span><span class="p">(</span><span class="nx">it</span><span class="p">=&gt;</span><span class="p">{</span><span class="k">if</span><span class="p">(</span><span class="nx">it</span><span class="p">.</span><span class="nx">vod_pic</span><span class="o">&amp;&amp;</span><span class="nx">it</span><span class="p">.</span><span class="nx">vod_pic</span><span class="p">.</span><span class="nx">startsWith</span><span class="p">(</span><span class="s2">&#34;http&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="nx">it</span><span class="p">.</span><span class="nx">vod_pic</span><span class="o">=</span><span class="nx">it</span><span class="p">.</span><span class="nx">vod_pic</span><span class="o">+</span><span class="nx">rule</span><span class="p">.</span><span class="nx">图片来源</span><span class="p">}</span><span class="p">}</span><span class="p">)</span><span class="p">}</span><span class="k">if</span><span class="p">(</span><span class="nx">d</span><span class="p">.</span><span class="nx">length</span><span class="o">&gt;</span><span class="mi">0</span><span class="p">)</span><span class="p">{</span><span class="nx">print</span><span class="p">(</span><span class="nx">d</span><span class="p">.</span><span class="nx">slice</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="mi">2</span><span class="p">)</span><span class="p">)</span><span class="p">}</span><span class="k">return</span> <span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span><span class="p">{</span><span class="nx">list</span><span class="o">:</span><span class="nx">d</span><span class="p">}</span><span class="p">)</span><span class="p">}</span><span class="kd">function</span> <span class="nx">categoryParse</span><span class="p">(</span><span class="nx">cateObj</span><span class="p">)</span><span class="p">{</span><span class="nx">fetch_params</span><span class="o">=</span><span class="nx">JSON</span><span class="p">.</span><span class="nx">parse</span><span class="p">(</span><span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span><span class="nx">rule_fetch_params</span><span class="p">)</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">p</span><span class="o">=</span><span class="nx">cateObj</span><span class="p">.</span><span class="nx">一级</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="nx">p</span><span class="o">||</span><span class="k">typeof</span> <span class="nx">p</span><span class="o">!==</span><span class="s2">&#34;string&#34;</span><span class="p">)</span><span class="p">{</span><span class="k">return</span><span class="s2">&#34;{}&#34;</span><span class="p">}</span><span class="kd">let</span> <span class="nx">d</span><span class="o">=</span><span class="p">[</span><span class="p">]</span><span class="p">;</span><span class="kd">let</span> <span class="nx">url</span><span class="o">=</span><span class="nx">cateObj</span><span class="p">.</span><span class="nx">url</span><span class="p">.</span><span class="nx">replaceAll</span><span class="p">(</span><span class="s2">&#34;fyclass&#34;</span><span class="p">,</span><span class="nx">cateObj</span><span class="p">.</span><span class="nx">tid</span><span class="p">)</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">cateObj</span><span class="p">.</span><span class="nx">pg</span><span class="o">===</span><span class="mi">1</span><span class="o">&amp;&amp;</span><span class="nx">url</span><span class="p">.</span><span class="nx">includes</span><span class="p">(</span><span class="s2">&#34;[&#34;</span><span class="p">)</span><span class="o">&amp;&amp;</span><span class="nx">url</span><span class="p">.</span><span class="nx">includes</span><span class="p">(</span><span class="s2">&#34;]&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="nx">url</span><span class="o">=</span><span class="nx">url</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span><span class="s2">&#34;[&#34;</span><span class="p">)</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span><span class="s2">&#34;]&#34;</span><span class="p">)</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="p">}</span><span class="k">else</span> <span class="k">if</span><span class="p">(</span><span class="nx">cateObj</span><span class="p">.</span><span class="nx">pg</span><span class="o">&gt;</span><span class="mi">1</span><span class="o">&amp;&amp;</span><span class="nx">url</span><span class="p">.</span><span class="nx">includes</span><span class="p">(</span><span class="s2">&#34;[&#34;</span><span class="p">)</span><span class="o">&amp;&amp;</span><span class="nx">url</span><span class="p">.</span><span class="nx">includes</span><span class="p">(</span><span class="s2">&#34;]&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="nx">url</span><span class="o">=</span><span class="nx">url</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span><span class="s2">&#34;[&#34;</span><span class="p">)</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="p">}</span><span class="k">if</span><span class="p">(</span><span class="nx">rule</span><span class="p">.</span><span class="nx">filter_url</span><span class="p">)</span><span class="p">{</span><span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="sr">/fyfilter/</span><span class="p">.</span><span class="nx">test</span><span class="p">(</span><span class="nx">url</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="nx">url</span><span class="p">.</span><span class="nx">endsWith</span><span class="p">(</span><span class="s2">&#34;&amp;&#34;</span><span class="p">)</span><span class="o">&amp;&amp;</span><span class="o">!</span><span class="nx">rule</span><span class="p">.</span><span class="nx">filter_url</span><span class="p">.</span><span class="nx">startsWith</span><span class="p">(</span><span class="s2">&#34;&amp;&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="nx">url</span><span class="o">+=</span><span class="s2">&#34;&amp;&#34;</span><span class="p">}</span><span class="nx">url</span><span class="o">+=</span><span class="nx">rule</span><span class="p">.</span><span class="nx">filter_url</span><span class="p">}</span><span class="k">else</span><span class="p">{</span><span class="nx">url</span><span class="o">=</span><span class="nx">url</span><span class="p">.</span><span class="nx">replace</span><span class="p">(</span><span class="s2">&#34;fyfilter&#34;</span><span class="p">,</span><span class="nx">rule</span><span class="p">.</span><span class="nx">filter_url</span><span class="p">)</span><span class="p">}</span><span class="kd">let</span> <span class="nx">fl</span><span class="o">=</span><span class="nx">cateObj</span><span class="p">.</span><span class="nx">filter</span><span class="o">?</span><span class="nx">cateObj</span><span class="p">.</span><span class="nx">extend</span><span class="o">:</span><span class="p">{</span><span class="p">}</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">rule</span><span class="p">.</span><span class="nx">filter_def</span><span class="o">&amp;&amp;</span><span class="k">typeof</span> <span class="nx">rule</span><span class="p">.</span><span class="nx">filter_def</span><span class="o">===</span><span class="s2">&#34;object&#34;</span><span class="p">)</span><span class="p">{</span><span class="k">try</span><span class="p">{</span><span class="k">if</span><span class="p">(</span><span class="nb">Object</span><span class="p">.</span><span class="nx">keys</span><span class="p">(</span><span class="nx">rule</span><span class="p">.</span><span class="nx">filter_def</span><span class="p">)</span><span class="p">.</span><span class="nx">length</span><span class="o">&gt;</span><span class="mi">0</span><span class="o">&amp;&amp;</span><span class="nx">rule</span><span class="p">.</span><span class="nx">filter_def</span><span class="p">.</span><span class="nx">hasOwnProperty</span><span class="p">(</span><span class="nx">cateObj</span><span class="p">.</span><span class="nx">tid</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="kd">let</span> <span class="nx">self_fl_def</span><span class="o">=</span><span class="nx">rule</span><span class="p">.</span><span class="nx">filter_def</span><span class="p">[</span><span class="nx">cateObj</span><span class="p">.</span><span class="nx">tid</span><span class="p">]</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">self_fl_def</span><span class="o">&amp;&amp;</span><span class="k">typeof</span> <span class="nx">self_fl_def</span><span class="o">===</span><span class="s2">&#34;object&#34;</span><span class="p">)</span><span class="p">{</span><span class="kd">let</span> <span class="nx">fl_def</span><span class="o">=</span><span class="nx">JSON</span><span class="p">.</span><span class="nx">parse</span><span class="p">(</span><span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span><span class="nx">self_fl_def</span><span class="p">)</span><span class="p">)</span><span class="p">;</span><span class="nx">fl</span><span class="o">=</span><span class="nb">Object</span><span class="p">.</span><span class="nx">assign</span><span class="p">(</span><span class="nx">fl_def</span><span class="p">,</span><span class="nx">fl</span><span class="p">)</span><span class="p">}</span><span class="p">}</span><span class="p">}</span><span class="k">catch</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span><span class="p">{</span><span class="nx">print</span><span class="p">(</span><span class="s2">&#34;合并不同分类对应的默认筛选出错:&#34;</span><span class="o">+</span><span class="nx">e</span><span class="p">.</span><span class="nx">message</span><span class="p">)</span><span class="p">}</span><span class="p">}</span><span class="kd">let</span> <span class="nx">new_url</span><span class="p">;</span><span class="nx">new_url</span><span class="o">=</span><span class="nx">cheerio</span><span class="p">.</span><span class="nx">jinja2</span><span class="p">(</span><span class="nx">url</span><span class="p">,</span><span class="p">{</span><span class="nx">fl</span><span class="o">:</span><span class="nx">fl</span><span class="p">}</span><span class="p">)</span><span class="p">;</span><span class="nx">url</span><span class="o">=</span><span class="nx">new_url</span><span class="p">}</span><span class="k">if</span><span class="p">(</span><span class="sr">/fypage/</span><span class="p">.</span><span class="nx">test</span><span class="p">(</span><span class="nx">url</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="k">if</span><span class="p">(</span><span class="nx">url</span><span class="p">.</span><span class="nx">includes</span><span class="p">(</span><span class="s2">&#34;(&#34;</span><span class="p">)</span><span class="o">&amp;&amp;</span><span class="nx">url</span><span class="p">.</span><span class="nx">includes</span><span class="p">(</span><span class="s2">&#34;)&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="kd">let</span> <span class="nx">url_rep</span><span class="o">=</span><span class="nx">url</span><span class="p">.</span><span class="nx">match</span><span class="p">(</span><span class="sr">/.*?\((.*)\)/</span><span class="p">)</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="p">;</span><span class="kd">let</span> <span class="nx">cnt_page</span><span class="o">=</span><span class="nx">url_rep</span><span class="p">.</span><span class="nx">replaceAll</span><span class="p">(</span><span class="s2">&#34;fypage&#34;</span><span class="p">,</span><span class="nx">cateObj</span><span class="p">.</span><span class="nx">pg</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">cnt_pg</span><span class="o">=</span><span class="nb">eval</span><span class="p">(</span><span class="nx">cnt_page</span><span class="p">)</span><span class="p">;</span><span class="nx">url</span><span class="o">=</span><span class="nx">url</span><span class="p">.</span><span class="nx">replaceAll</span><span class="p">(</span><span class="nx">url_rep</span><span class="p">,</span><span class="nx">cnt_pg</span><span class="p">)</span><span class="p">.</span><span class="nx">replaceAll</span><span class="p">(</span><span class="s2">&#34;(&#34;</span><span class="p">,</span><span class="s2">&#34;&#34;</span><span class="p">)</span><span class="p">.</span><span class="nx">replaceAll</span><span class="p">(</span><span class="s2">&#34;)&#34;</span><span class="p">,</span><span class="s2">&#34;&#34;</span><span class="p">)</span><span class="p">}</span><span class="k">else</span><span class="p">{</span><span class="nx">url</span><span class="o">=</span><span class="nx">url</span><span class="p">.</span><span class="nx">replaceAll</span><span class="p">(</span><span class="s2">&#34;fypage&#34;</span><span class="p">,</span><span class="nx">cateObj</span><span class="p">.</span><span class="nx">pg</span><span class="p">)</span><span class="p">}</span><span class="p">}</span><span class="nx">MY_URL</span><span class="o">=</span><span class="nx">url</span><span class="p">;</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">MY_URL</span><span class="p">)</span><span class="p">;</span><span class="nx">p</span><span class="o">=</span><span class="nx">p</span><span class="p">.</span><span class="nx">trim</span><span class="p">(</span><span class="p">)</span><span class="p">;</span><span class="kr">const</span> <span class="nx">MY_CATE</span><span class="o">=</span><span class="nx">cateObj</span><span class="p">.</span><span class="nx">tid</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">p</span><span class="p">.</span><span class="nx">startsWith</span><span class="p">(</span><span class="s2">&#34;js:&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="kd">var</span> <span class="nx">MY_FL</span><span class="o">=</span><span class="nx">cateObj</span><span class="p">.</span><span class="nx">extend</span><span class="p">;</span><span class="kr">const</span> <span class="nx">TYPE</span><span class="o">=</span><span class="s2">&#34;cate&#34;</span><span class="p">;</span><span class="kd">var</span> <span class="nx">input</span><span class="o">=</span><span class="nx">MY_URL</span><span class="p">;</span><span class="kr">const</span> <span class="nx">MY_PAGE</span><span class="o">=</span><span class="nx">cateObj</span><span class="p">.</span><span class="nx">pg</span><span class="p">;</span><span class="kd">var</span> <span class="nx">desc</span><span class="o">=</span><span class="s2">&#34;&#34;</span><span class="p">;</span><span class="nb">eval</span><span class="p">(</span><span class="nx">p</span><span class="p">.</span><span class="nx">trim</span><span class="p">(</span><span class="p">)</span><span class="p">.</span><span class="nx">replace</span><span class="p">(</span><span class="s2">&#34;js:&#34;</span><span class="p">,</span><span class="s2">&#34;&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">;</span><span class="nx">d</span><span class="o">=</span><span class="nx">VODS</span><span class="p">}</span><span class="k">else</span><span class="p">{</span><span class="nx">p</span><span class="o">=</span><span class="nx">p</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span><span class="s2">&#34;;&#34;</span><span class="p">)</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">p</span><span class="p">.</span><span class="nx">length</span><span class="o">&lt;</span><span class="mi">5</span><span class="p">)</span><span class="p">{</span><span class="k">return</span><span class="s2">&#34;{}&#34;</span><span class="p">}</span><span class="kd">let</span> <span class="nx">_ps</span><span class="o">=</span><span class="nx">parseTags</span><span class="p">.</span><span class="nx">getParse</span><span class="p">(</span><span class="nx">p</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="p">)</span><span class="p">;</span><span class="nx">_pdfa</span><span class="o">=</span><span class="nx">_ps</span><span class="p">.</span><span class="nx">pdfa</span><span class="p">;</span><span class="nx">_pdfh</span><span class="o">=</span><span class="nx">_ps</span><span class="p">.</span><span class="nx">pdfh</span><span class="p">;</span><span class="nx">_pd</span><span class="o">=</span><span class="nx">_ps</span><span class="p">.</span><span class="nx">pd</span><span class="p">;</span><span class="kd">let</span> <span class="nx">is_json</span><span class="o">=</span><span class="nx">p</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="p">.</span><span class="nx">startsWith</span><span class="p">(</span><span class="s2">&#34;json:&#34;</span><span class="p">)</span><span class="p">;</span><span class="nx">p</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">=</span><span class="nx">p</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="p">.</span><span class="nx">replace</span><span class="p">(</span><span class="sr">/^(jsp:|json:|jq:)/</span><span class="p">,</span><span class="s2">&#34;&#34;</span><span class="p">)</span><span class="p">;</span><span class="k">try</span><span class="p">{</span><span class="kd">let</span> <span class="nx">html</span><span class="o">=</span><span class="nx">getHtml</span><span class="p">(</span><span class="nx">MY_URL</span><span class="p">)</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">html</span><span class="p">)</span><span class="p">{</span><span class="k">if</span><span class="p">(</span><span class="nx">is_json</span><span class="p">)</span><span class="p">{</span><span class="nx">html</span><span class="o">=</span><span class="nx">dealJson</span><span class="p">(</span><span class="nx">html</span><span class="p">)</span><span class="p">}</span><span class="kd">let</span> <span class="nx">list</span><span class="o">=</span><span class="nx">_pdfa</span><span class="p">(</span><span class="nx">html</span><span class="p">,</span><span class="nx">p</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="p">)</span><span class="p">;</span><span class="nx">list</span><span class="p">.</span><span class="nx">forEach</span><span class="p">(</span><span class="nx">it</span><span class="p">=&gt;</span><span class="p">{</span><span class="kd">let</span> <span class="nx">links</span><span class="o">=</span><span class="nx">p</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span><span class="s2">&#34;+&#34;</span><span class="p">)</span><span class="p">.</span><span class="nx">map</span><span class="p">(</span><span class="nx">p4</span><span class="p">=&gt;</span><span class="p">{</span><span class="k">return</span><span class="o">!</span><span class="nx">rule</span><span class="p">.</span><span class="nx">detailUrl</span><span class="o">?</span><span class="nx">_pd</span><span class="p">(</span><span class="nx">it</span><span class="p">,</span><span class="nx">p4</span><span class="p">,</span><span class="nx">MY_URL</span><span class="p">)</span><span class="o">:</span><span class="nx">_pdfh</span><span class="p">(</span><span class="nx">it</span><span class="p">,</span><span class="nx">p4</span><span class="p">)</span><span class="p">}</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">link</span><span class="o">=</span><span class="nx">links</span><span class="p">.</span><span class="nx">join</span><span class="p">(</span><span class="s2">&#34;$&#34;</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">vod_id</span><span class="o">=</span><span class="nx">rule</span><span class="p">.</span><span class="nx">detailUrl</span><span class="o">?</span><span class="nx">MY_CATE</span><span class="o">+</span><span class="s2">&#34;$&#34;</span><span class="o">+</span><span class="nx">link</span><span class="o">:</span><span class="nx">link</span><span class="p">;</span><span class="kd">let</span> <span class="nx">vod_name</span><span class="o">=</span><span class="nx">_pdfh</span><span class="p">(</span><span class="nx">it</span><span class="p">,</span><span class="nx">p</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="p">)</span><span class="p">.</span><span class="nx">replace</span><span class="p">(</span><span class="sr">/\n|\t/g</span><span class="p">,</span><span class="s2">&#34;&#34;</span><span class="p">)</span><span class="p">.</span><span class="nx">trim</span><span class="p">(</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">vod_pic</span><span class="o">=</span><span class="nx">_pd</span><span class="p">(</span><span class="nx">it</span><span class="p">,</span><span class="nx">p</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span><span class="p">,</span><span class="nx">MY_URL</span><span class="p">)</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">rule</span><span class="p">.</span><span class="nx">二级</span><span class="o">===</span><span class="s2">&#34;*&#34;</span><span class="p">)</span><span class="p">{</span><span class="nx">vod_id</span><span class="o">=</span><span class="nx">vod_id</span><span class="o">+</span><span class="s2">&#34;@@&#34;</span><span class="o">+</span><span class="nx">vod_name</span><span class="o">+</span><span class="s2">&#34;@@&#34;</span><span class="o">+</span><span class="nx">vod_pic</span><span class="p">}</span><span class="nx">d</span><span class="p">.</span><span class="nx">push</span><span class="p">(</span><span class="p">{</span><span class="nx">vod_id</span><span class="o">:</span><span class="nx">vod_id</span><span class="p">,</span><span class="nx">vod_name</span><span class="o">:</span><span class="nx">vod_name</span><span class="p">,</span><span class="nx">vod_pic</span><span class="o">:</span><span class="nx">vod_pic</span><span class="p">,</span><span class="nx">vod_remarks</span><span class="o">:</span><span class="nx">_pdfh</span><span class="p">(</span><span class="nx">it</span><span class="p">,</span><span class="nx">p</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span><span class="p">)</span><span class="p">.</span><span class="nx">replace</span><span class="p">(</span><span class="sr">/\n|\t/g</span><span class="p">,</span><span class="s2">&#34;&#34;</span><span class="p">)</span><span class="p">.</span><span class="nx">trim</span><span class="p">(</span><span class="p">)</span><span class="p">}</span><span class="p">)</span><span class="p">}</span><span class="p">)</span><span class="p">}</span><span class="p">}</span><span class="k">catch</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span><span class="p">{</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">e</span><span class="p">.</span><span class="nx">message</span><span class="p">)</span><span class="p">}</span><span class="p">}</span><span class="k">if</span><span class="p">(</span><span class="nx">rule</span><span class="p">.</span><span class="nx">图片来源</span><span class="p">)</span><span class="p">{</span><span class="nx">d</span><span class="p">.</span><span class="nx">forEach</span><span class="p">(</span><span class="nx">it</span><span class="p">=&gt;</span><span class="p">{</span><span class="k">if</span><span class="p">(</span><span class="nx">it</span><span class="p">.</span><span class="nx">vod_pic</span><span class="o">&amp;&amp;</span><span class="nx">it</span><span class="p">.</span><span class="nx">vod_pic</span><span class="p">.</span><span class="nx">startsWith</span><span class="p">(</span><span class="s2">&#34;http&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="nx">it</span><span class="p">.</span><span class="nx">vod_pic</span><span class="o">=</span><span class="nx">it</span><span class="p">.</span><span class="nx">vod_pic</span><span class="o">+</span><span class="nx">rule</span><span class="p">.</span><span class="nx">图片来源</span><span class="p">}</span><span class="p">}</span><span class="p">)</span><span class="p">}</span><span class="k">if</span><span class="p">(</span><span class="nx">d</span><span class="p">.</span><span class="nx">length</span><span class="o">&gt;</span><span class="mi">0</span><span class="p">)</span><span class="p">{</span><span class="nx">print</span><span class="p">(</span><span class="nx">d</span><span class="p">.</span><span class="nx">slice</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="mi">2</span><span class="p">)</span><span class="p">)</span><span class="p">}</span><span class="kd">let</span> <span class="nx">pagecount</span><span class="o">=</span><span class="mi">0</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">rule</span><span class="p">.</span><span class="nx">pagecount</span><span class="o">&amp;&amp;</span><span class="k">typeof</span> <span class="nx">rule</span><span class="p">.</span><span class="nx">pagecount</span><span class="o">===</span><span class="s2">&#34;object&#34;</span><span class="o">&amp;&amp;</span><span class="nx">rule</span><span class="p">.</span><span class="nx">pagecount</span><span class="p">.</span><span class="nx">hasOwnProperty</span><span class="p">(</span><span class="nx">MY_CATE</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="nx">print</span><span class="p">(</span><span class="sb">`</span><span class="sb">MY_CATE:</span><span class="si">${</span><span class="nx">MY_CATE</span><span class="si">}</span><span class="sb">,pagecount:</span><span class="si">${</span><span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span><span class="nx">rule</span><span class="p">.</span><span class="nx">pagecount</span><span class="p">)</span><span class="si">}</span><span class="sb">`</span><span class="p">)</span><span class="p">;</span><span class="nx">pagecount</span><span class="o">=</span><span class="nb">parseInt</span><span class="p">(</span><span class="nx">rule</span><span class="p">.</span><span class="nx">pagecount</span><span class="p">[</span><span class="nx">MY_CATE</span><span class="p">]</span><span class="p">)</span><span class="p">}</span><span class="kd">let</span> <span class="nx">nodata</span><span class="o">=</span><span class="p">{</span><span class="nx">list</span><span class="o">:</span><span class="p">[</span><span class="p">{</span><span class="nx">vod_name</span><span class="o">:</span><span class="s2">&#34;无数据,防无限请求&#34;</span><span class="p">,</span><span class="nx">vod_id</span><span class="o">:</span><span class="s2">&#34;no_data&#34;</span><span class="p">,</span><span class="nx">vod_remarks</span><span class="o">:</span><span class="s2">&#34;不要点,会崩的&#34;</span><span class="p">,</span><span class="nx">vod_pic</span><span class="o">:</span><span class="s2">&#34;https://ghproxy.net/https://raw.githubusercontent.com/hjdhnx/dr_py/main/404.jpg&#34;</span><span class="p">}</span><span class="p">]</span><span class="p">,</span><span class="nx">total</span><span class="o">:</span><span class="mi">1</span><span class="p">,</span><span class="nx">pagecount</span><span class="o">:</span><span class="mi">1</span><span class="p">,</span><span class="nx">page</span><span class="o">:</span><span class="mi">1</span><span class="p">,</span><span class="nx">limit</span><span class="o">:</span><span class="mi">1</span><span class="p">}</span><span class="p">;</span><span class="kd">let</span> <span class="nx">vod</span><span class="o">=</span><span class="nx">d</span><span class="p">.</span><span class="nx">length</span><span class="o">&lt;</span><span class="mi">1</span><span class="o">?</span><span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span><span class="nx">nodata</span><span class="p">)</span><span class="o">:</span><span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span><span class="p">{</span><span class="nx">page</span><span class="o">:</span><span class="nb">parseInt</span><span class="p">(</span><span class="nx">cateObj</span><span class="p">.</span><span class="nx">pg</span><span class="p">)</span><span class="p">,</span><span class="nx">pagecount</span><span class="o">:</span><span class="nx">pagecount</span><span class="o">||</span><span class="mi">999</span><span class="p">,</span><span class="nx">limit</span><span class="o">:</span><span class="mi">20</span><span class="p">,</span><span class="nx">total</span><span class="o">:</span><span class="mi">999</span><span class="p">,</span><span class="nx">list</span><span class="o">:</span><span class="nx">d</span><span class="p">}</span><span class="p">)</span><span class="p">;</span><span class="k">return</span> <span class="nx">vod</span><span class="p">}</span><span class="kd">function</span> <span class="nx">searchParse</span><span class="p">(</span><span class="nx">searchObj</span><span class="p">)</span><span class="p">{</span><span class="nx">fetch_params</span><span class="o">=</span><span class="nx">JSON</span><span class="p">.</span><span class="nx">parse</span><span class="p">(</span><span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span><span class="nx">rule_fetch_params</span><span class="p">)</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">d</span><span class="o">=</span><span class="p">[</span><span class="p">]</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="nx">searchObj</span><span class="p">.</span><span class="nx">searchUrl</span><span class="p">)</span><span class="p">{</span><span class="k">return</span><span class="s2">&#34;{}&#34;</span><span class="p">}</span><span class="kd">let</span> <span class="nx">p</span><span class="o">=</span><span class="nx">searchObj</span><span class="p">.</span><span class="nx">搜索</span><span class="o">===</span><span class="s2">&#34;*&#34;</span><span class="o">&amp;&amp;</span><span class="nx">rule</span><span class="p">.</span><span class="nx">一级</span><span class="o">?</span><span class="nx">rule</span><span class="p">.</span><span class="nx">一级</span><span class="o">:</span><span class="nx">searchObj</span><span class="p">.</span><span class="nx">搜索</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="nx">p</span><span class="o">||</span><span class="k">typeof</span> <span class="nx">p</span><span class="o">!==</span><span class="s2">&#34;string&#34;</span><span class="p">)</span><span class="p">{</span><span class="k">return</span><span class="s2">&#34;{}&#34;</span><span class="p">}</span><span class="nx">p</span><span class="o">=</span><span class="nx">p</span><span class="p">.</span><span class="nx">trim</span><span class="p">(</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">pp</span><span class="o">=</span><span class="nx">rule</span><span class="p">.</span><span class="nx">一级</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span><span class="s2">&#34;;&#34;</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">url</span><span class="o">=</span><span class="nx">searchObj</span><span class="p">.</span><span class="nx">searchUrl</span><span class="p">.</span><span class="nx">replaceAll</span><span class="p">(</span><span class="s2">&#34;**&#34;</span><span class="p">,</span><span class="nx">searchObj</span><span class="p">.</span><span class="nx">wd</span><span class="p">)</span><span class="p">.</span><span class="nx">replaceAll</span><span class="p">(</span><span class="s2">&#34;fypage&#34;</span><span class="p">,</span><span class="nx">searchObj</span><span class="p">.</span><span class="nx">pg</span><span class="p">)</span><span class="p">;</span><span class="nx">MY_URL</span><span class="o">=</span><span class="nx">url</span><span class="p">;</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">MY_URL</span><span class="p">)</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">p</span><span class="p">.</span><span class="nx">startsWith</span><span class="p">(</span><span class="s2">&#34;js:&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="kr">const</span> <span class="nx">TYPE</span><span class="o">=</span><span class="s2">&#34;search&#34;</span><span class="p">;</span><span class="kr">const</span> <span class="nx">MY_PAGE</span><span class="o">=</span><span class="nx">searchObj</span><span class="p">.</span><span class="nx">pg</span><span class="p">;</span><span class="kr">const</span> <span class="nx">KEY</span><span class="o">=</span><span class="nx">searchObj</span><span class="p">.</span><span class="nx">wd</span><span class="p">;</span><span class="kd">var</span> <span class="nx">input</span><span class="o">=</span><span class="nx">MY_URL</span><span class="p">;</span><span class="kd">var</span> <span class="nx">detailUrl</span><span class="o">=</span><span class="nx">rule</span><span class="p">.</span><span class="nx">detailUrl</span><span class="o">||</span><span class="s2">&#34;&#34;</span><span class="p">;</span><span class="nb">eval</span><span class="p">(</span><span class="nx">p</span><span class="p">.</span><span class="nx">trim</span><span class="p">(</span><span class="p">)</span><span class="p">.</span><span class="nx">replace</span><span class="p">(</span><span class="s2">&#34;js:&#34;</span><span class="p">,</span><span class="s2">&#34;&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">;</span><span class="nx">d</span><span class="o">=</span><span class="nx">VODS</span><span class="p">}</span><span class="k">else</span><span class="p">{</span><span class="nx">p</span><span class="o">=</span><span class="nx">p</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span><span class="s2">&#34;;&#34;</span><span class="p">)</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">p</span><span class="p">.</span><span class="nx">length</span><span class="o">&lt;</span><span class="mi">5</span><span class="p">)</span><span class="p">{</span><span class="k">return</span><span class="s2">&#34;{}&#34;</span><span class="p">}</span><span class="kd">let</span> <span class="nx">p0</span><span class="o">=</span><span class="nx">getPP</span><span class="p">(</span><span class="nx">p</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="nx">pp</span><span class="p">,</span><span class="mi">0</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">_ps</span><span class="o">=</span><span class="nx">parseTags</span><span class="p">.</span><span class="nx">getParse</span><span class="p">(</span><span class="nx">p0</span><span class="p">)</span><span class="p">;</span><span class="nx">_pdfa</span><span class="o">=</span><span class="nx">_ps</span><span class="p">.</span><span class="nx">pdfa</span><span class="p">;</span><span class="nx">_pdfh</span><span class="o">=</span><span class="nx">_ps</span><span class="p">.</span><span class="nx">pdfh</span><span class="p">;</span><span class="nx">_pd</span><span class="o">=</span><span class="nx">_ps</span><span class="p">.</span><span class="nx">pd</span><span class="p">;</span><span class="kd">let</span> <span class="nx">is_json</span><span class="o">=</span><span class="nx">p0</span><span class="p">.</span><span class="nx">startsWith</span><span class="p">(</span><span class="s2">&#34;json:&#34;</span><span class="p">)</span><span class="p">;</span><span class="nx">p0</span><span class="o">=</span><span class="nx">p0</span><span class="p">.</span><span class="nx">replace</span><span class="p">(</span><span class="sr">/^(jsp:|json:|jq:)/</span><span class="p">,</span><span class="s2">&#34;&#34;</span><span class="p">)</span><span class="p">;</span><span class="k">try</span><span class="p">{</span><span class="kd">let</span> <span class="nx">req_method</span><span class="o">=</span><span class="nx">MY_URL</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span><span class="s2">&#34;;&#34;</span><span class="p">)</span><span class="p">.</span><span class="nx">length</span><span class="o">&gt;</span><span class="mi">1</span><span class="o">?</span><span class="nx">MY_URL</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span><span class="s2">&#34;;&#34;</span><span class="p">)</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="p">.</span><span class="nx">toLowerCase</span><span class="p">(</span><span class="p">)</span><span class="o">:</span><span class="s2">&#34;get&#34;</span><span class="p">;</span><span class="kd">let</span> <span class="nx">html</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">req_method</span><span class="o">===</span><span class="s2">&#34;post&#34;</span><span class="p">)</span><span class="p">{</span><span class="kd">let</span> <span class="nx">rurls</span><span class="o">=</span><span class="nx">MY_URL</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span><span class="s2">&#34;;&#34;</span><span class="p">)</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span><span class="s2">&#34;#&#34;</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">rurl</span><span class="o">=</span><span class="nx">rurls</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="p">;</span><span class="kd">let</span> <span class="nx">params</span><span class="o">=</span><span class="nx">rurls</span><span class="p">.</span><span class="nx">length</span><span class="o">&gt;</span><span class="mi">1</span><span class="o">?</span><span class="nx">rurls</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="o">:</span><span class="s2">&#34;&#34;</span><span class="p">;</span><span class="nx">print</span><span class="p">(</span><span class="sb">`</span><span class="sb">post=》rurl:</span><span class="si">${</span><span class="nx">rurl</span><span class="si">}</span><span class="sb">,params:</span><span class="si">${</span><span class="nx">params</span><span class="si">}</span><span class="sb">`</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">_fetch_params</span><span class="o">=</span><span class="nx">JSON</span><span class="p">.</span><span class="nx">parse</span><span class="p">(</span><span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span><span class="nx">rule_fetch_params</span><span class="p">)</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">postData</span><span class="o">=</span><span class="p">{</span><span class="nx">body</span><span class="o">:</span><span class="nx">params</span><span class="p">}</span><span class="p">;</span><span class="nb">Object</span><span class="p">.</span><span class="nx">assign</span><span class="p">(</span><span class="nx">_fetch_params</span><span class="p">,</span><span class="nx">postData</span><span class="p">)</span><span class="p">;</span><span class="nx">html</span><span class="o">=</span><span class="nx">post</span><span class="p">(</span><span class="nx">rurl</span><span class="p">,</span><span class="nx">_fetch_params</span><span class="p">)</span><span class="p">}</span><span class="k">else</span> <span class="k">if</span><span class="p">(</span><span class="nx">req_method</span><span class="o">===</span><span class="s2">&#34;postjson&#34;</span><span class="p">)</span><span class="p">{</span><span class="kd">let</span> <span class="nx">rurls</span><span class="o">=</span><span class="nx">MY_URL</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span><span class="s2">&#34;;&#34;</span><span class="p">)</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span><span class="s2">&#34;#&#34;</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">rurl</span><span class="o">=</span><span class="nx">rurls</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="p">;</span><span class="kd">let</span> <span class="nx">params</span><span class="o">=</span><span class="nx">rurls</span><span class="p">.</span><span class="nx">length</span><span class="o">&gt;</span><span class="mi">1</span><span class="o">?</span><span class="nx">rurls</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="o">:</span><span class="s2">&#34;&#34;</span><span class="p">;</span><span class="nx">print</span><span class="p">(</span><span class="sb">`</span><span class="sb">postjson-》rurl:</span><span class="si">${</span><span class="nx">rurl</span><span class="si">}</span><span class="sb">,params:</span><span class="si">${</span><span class="nx">params</span><span class="si">}</span><span class="sb">`</span><span class="p">)</span><span class="p">;</span><span class="k">try</span><span class="p">{</span><span class="nx">params</span><span class="o">=</span><span class="nx">JSON</span><span class="p">.</span><span class="nx">parse</span><span class="p">(</span><span class="nx">params</span><span class="p">)</span><span class="p">}</span><span class="k">catch</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span><span class="p">{</span><span class="nx">params</span><span class="o">=</span><span class="s2">&#34;{}&#34;</span><span class="p">}</span><span class="kd">let</span> <span class="nx">_fetch_params</span><span class="o">=</span><span class="nx">JSON</span><span class="p">.</span><span class="nx">parse</span><span class="p">(</span><span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span><span class="nx">rule_fetch_params</span><span class="p">)</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">postData</span><span class="o">=</span><span class="p">{</span><span class="nx">body</span><span class="o">:</span><span class="nx">params</span><span class="p">}</span><span class="p">;</span><span class="nb">Object</span><span class="p">.</span><span class="nx">assign</span><span class="p">(</span><span class="nx">_fetch_params</span><span class="p">,</span><span class="nx">postData</span><span class="p">)</span><span class="p">;</span><span class="nx">html</span><span class="o">=</span><span class="nx">post</span><span class="p">(</span><span class="nx">rurl</span><span class="p">,</span><span class="nx">_fetch_params</span><span class="p">)</span><span class="p">}</span><span class="k">else</span><span class="p">{</span><span class="nx">html</span><span class="o">=</span><span class="nx">getHtml</span><span class="p">(</span><span class="nx">MY_URL</span><span class="p">)</span><span class="p">}</span><span class="k">if</span><span class="p">(</span><span class="nx">html</span><span class="p">)</span><span class="p">{</span><span class="k">if</span><span class="p">(</span><span class="sr">/系统安全验证|输入验证码/</span><span class="p">.</span><span class="nx">test</span><span class="p">(</span><span class="nx">html</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="kd">let</span> <span class="nx">cookie</span><span class="o">=</span><span class="nx">verifyCode</span><span class="p">(</span><span class="nx">MY_URL</span><span class="p">)</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">cookie</span><span class="p">)</span><span class="p">{</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="sb">`</span><span class="sb">本次成功过验证,cookie:</span><span class="si">${</span><span class="nx">cookie</span><span class="si">}</span><span class="sb">`</span><span class="p">)</span><span class="p">;</span><span class="nx">setItem</span><span class="p">(</span><span class="nx">RULE_CK</span><span class="p">,</span><span class="nx">cookie</span><span class="p">)</span><span class="p">}</span><span class="k">else</span><span class="p">{</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="sb">`</span><span class="sb">本次自动过搜索验证失败,cookie:</span><span class="si">${</span><span class="nx">cookie</span><span class="si">}</span><span class="sb">`</span><span class="p">)</span><span class="p">}</span><span class="nx">html</span><span class="o">=</span><span class="nx">getHtml</span><span class="p">(</span><span class="nx">MY_URL</span><span class="p">)</span><span class="p">}</span><span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="nx">html</span><span class="p">.</span><span class="nx">includes</span><span class="p">(</span><span class="nx">searchObj</span><span class="p">.</span><span class="nx">wd</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="s2">&#34;搜索结果源码未包含关键字,疑似搜索失败,正为您打印结果源码&#34;</span><span class="p">)</span><span class="p">;</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">html</span><span class="p">)</span><span class="p">}</span><span class="k">if</span><span class="p">(</span><span class="nx">is_json</span><span class="p">)</span><span class="p">{</span><span class="nx">html</span><span class="o">=</span><span class="nx">dealJson</span><span class="p">(</span><span class="nx">html</span><span class="p">)</span><span class="p">}</span><span class="kd">let</span> <span class="nx">list</span><span class="o">=</span><span class="nx">_pdfa</span><span class="p">(</span><span class="nx">html</span><span class="p">,</span><span class="nx">p0</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">p1</span><span class="o">=</span><span class="nx">getPP</span><span class="p">(</span><span class="nx">p</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="nx">pp</span><span class="p">,</span><span class="mi">1</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">p2</span><span class="o">=</span><span class="nx">getPP</span><span class="p">(</span><span class="nx">p</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="nx">pp</span><span class="p">,</span><span class="mi">2</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">p3</span><span class="o">=</span><span class="nx">getPP</span><span class="p">(</span><span class="nx">p</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="nx">pp</span><span class="p">,</span><span class="mi">3</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">p4</span><span class="o">=</span><span class="nx">getPP</span><span class="p">(</span><span class="nx">p</span><span class="p">,</span><span class="mi">4</span><span class="p">,</span><span class="nx">pp</span><span class="p">,</span><span class="mi">4</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">p5</span><span class="o">=</span><span class="nx">getPP</span><span class="p">(</span><span class="nx">p</span><span class="p">,</span><span class="mi">5</span><span class="p">,</span><span class="nx">pp</span><span class="p">,</span><span class="mi">5</span><span class="p">)</span><span class="p">;</span><span class="nx">list</span><span class="p">.</span><span class="nx">forEach</span><span class="p">(</span><span class="nx">it</span><span class="p">=&gt;</span><span class="p">{</span><span class="kd">let</span> <span class="nx">links</span><span class="o">=</span><span class="nx">p4</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span><span class="s2">&#34;+&#34;</span><span class="p">)</span><span class="p">.</span><span class="nx">map</span><span class="p">(</span><span class="nx">_p4</span><span class="p">=&gt;</span><span class="p">{</span><span class="k">return</span><span class="o">!</span><span class="nx">rule</span><span class="p">.</span><span class="nx">detailUrl</span><span class="o">?</span><span class="nx">_pd</span><span class="p">(</span><span class="nx">it</span><span class="p">,</span><span class="nx">_p4</span><span class="p">,</span><span class="nx">MY_URL</span><span class="p">)</span><span class="o">:</span><span class="nx">_pdfh</span><span class="p">(</span><span class="nx">it</span><span class="p">,</span><span class="nx">_p4</span><span class="p">)</span><span class="p">}</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">link</span><span class="o">=</span><span class="nx">links</span><span class="p">.</span><span class="nx">join</span><span class="p">(</span><span class="s2">&#34;$&#34;</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">content</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">p</span><span class="p">.</span><span class="nx">length</span><span class="o">&gt;</span><span class="mi">5</span><span class="o">&amp;&amp;</span><span class="nx">p</span><span class="p">[</span><span class="mi">5</span><span class="p">]</span><span class="p">)</span><span class="p">{</span><span class="nx">content</span><span class="o">=</span><span class="nx">_pdfh</span><span class="p">(</span><span class="nx">it</span><span class="p">,</span><span class="nx">p5</span><span class="p">)</span><span class="p">}</span><span class="k">else</span><span class="p">{</span><span class="nx">content</span><span class="o">=</span><span class="s2">&#34;&#34;</span><span class="p">}</span><span class="kd">let</span> <span class="nx">vod_id</span><span class="o">=</span><span class="nx">link</span><span class="p">;</span><span class="kd">let</span> <span class="nx">vod_name</span><span class="o">=</span><span class="nx">_pdfh</span><span class="p">(</span><span class="nx">it</span><span class="p">,</span><span class="nx">p1</span><span class="p">)</span><span class="p">.</span><span class="nx">replace</span><span class="p">(</span><span class="sr">/\n|\t/g</span><span class="p">,</span><span class="s2">&#34;&#34;</span><span class="p">)</span><span class="p">.</span><span class="nx">trim</span><span class="p">(</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">vod_pic</span><span class="o">=</span><span class="nx">_pd</span><span class="p">(</span><span class="nx">it</span><span class="p">,</span><span class="nx">p2</span><span class="p">,</span><span class="nx">MY_URL</span><span class="p">)</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">rule</span><span class="p">.</span><span class="nx">二级</span><span class="o">===</span><span class="s2">&#34;*&#34;</span><span class="p">)</span><span class="p">{</span><span class="nx">vod_id</span><span class="o">=</span><span class="nx">vod_id</span><span class="o">+</span><span class="s2">&#34;@@&#34;</span><span class="o">+</span><span class="nx">vod_name</span><span class="o">+</span><span class="s2">&#34;@@&#34;</span><span class="o">+</span><span class="nx">vod_pic</span><span class="p">}</span><span class="kd">let</span> <span class="nx">ob</span><span class="o">=</span><span class="p">{</span><span class="nx">vod_id</span><span class="o">:</span><span class="nx">vod_id</span><span class="p">,</span><span class="nx">vod_name</span><span class="o">:</span><span class="nx">vod_name</span><span class="p">,</span><span class="nx">vod_pic</span><span class="o">:</span><span class="nx">vod_pic</span><span class="p">,</span><span class="nx">vod_remarks</span><span class="o">:</span><span class="nx">_pdfh</span><span class="p">(</span><span class="nx">it</span><span class="p">,</span><span class="nx">p3</span><span class="p">)</span><span class="p">.</span><span class="nx">replace</span><span class="p">(</span><span class="sr">/\n|\t/g</span><span class="p">,</span><span class="s2">&#34;&#34;</span><span class="p">)</span><span class="p">.</span><span class="nx">trim</span><span class="p">(</span><span class="p">)</span><span class="p">,</span><span class="nx">vod_content</span><span class="o">:</span><span class="nx">content</span><span class="p">.</span><span class="nx">replace</span><span class="p">(</span><span class="sr">/\n|\t/g</span><span class="p">,</span><span class="s2">&#34;&#34;</span><span class="p">)</span><span class="p">.</span><span class="nx">trim</span><span class="p">(</span><span class="p">)</span><span class="p">}</span><span class="p">;</span><span class="nx">d</span><span class="p">.</span><span class="nx">push</span><span class="p">(</span><span class="nx">ob</span><span class="p">)</span><span class="p">}</span><span class="p">)</span><span class="p">}</span><span class="p">}</span><span class="k">catch</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span><span class="p">{</span><span class="nx">print</span><span class="p">(</span><span class="s2">&#34;搜索发生错误:&#34;</span><span class="o">+</span><span class="nx">e</span><span class="p">.</span><span class="nx">message</span><span class="p">)</span><span class="p">;</span><span class="k">return</span><span class="s2">&#34;{}&#34;</span><span class="p">}</span><span class="p">}</span><span class="k">if</span><span class="p">(</span><span class="nx">rule</span><span class="p">.</span><span class="nx">图片来源</span><span class="p">)</span><span class="p">{</span><span class="nx">d</span><span class="p">.</span><span class="nx">forEach</span><span class="p">(</span><span class="nx">it</span><span class="p">=&gt;</span><span class="p">{</span><span class="k">if</span><span class="p">(</span><span class="nx">it</span><span class="p">.</span><span class="nx">vod_pic</span><span class="o">&amp;&amp;</span><span class="nx">it</span><span class="p">.</span><span class="nx">vod_pic</span><span class="p">.</span><span class="nx">startsWith</span><span class="p">(</span><span class="s2">&#34;http&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="nx">it</span><span class="p">.</span><span class="nx">vod_pic</span><span class="o">=</span><span class="nx">it</span><span class="p">.</span><span class="nx">vod_pic</span><span class="o">+</span><span class="nx">rule</span><span class="p">.</span><span class="nx">图片来源</span><span class="p">}</span><span class="p">}</span><span class="p">)</span><span class="p">}</span><span class="k">return</span> <span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span><span class="p">{</span><span class="nx">page</span><span class="o">:</span><span class="nb">parseInt</span><span class="p">(</span><span class="nx">searchObj</span><span class="p">.</span><span class="nx">pg</span><span class="p">)</span><span class="p">,</span><span class="nx">pagecount</span><span class="o">:</span><span class="mi">10</span><span class="p">,</span><span class="nx">limit</span><span class="o">:</span><span class="mi">20</span><span class="p">,</span><span class="nx">total</span><span class="o">:</span><span class="mi">100</span><span class="p">,</span><span class="nx">list</span><span class="o">:</span><span class="nx">d</span><span class="p">}</span><span class="p">)</span><span class="p">}</span><span class="kd">function</span> <span class="nx">detailParse</span><span class="p">(</span><span class="nx">detailObj</span><span class="p">)</span><span class="p">{</span><span class="kd">let</span> <span class="nx">t1</span><span class="o">=</span><span class="p">(</span><span class="k">new</span> <span class="nb">Date</span><span class="p">)</span><span class="p">.</span><span class="nx">getTime</span><span class="p">(</span><span class="p">)</span><span class="p">;</span><span class="nx">fetch_params</span><span class="o">=</span><span class="nx">JSON</span><span class="p">.</span><span class="nx">parse</span><span class="p">(</span><span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span><span class="nx">rule_fetch_params</span><span class="p">)</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">orId</span><span class="o">=</span><span class="nx">detailObj</span><span class="p">.</span><span class="nx">orId</span><span class="p">;</span><span class="kd">let</span> <span class="nx">vod_name</span><span class="o">=</span><span class="s2">&#34;片名&#34;</span><span class="p">;</span><span class="kd">let</span> <span class="nx">vod_pic</span><span class="o">=</span><span class="s2">&#34;&#34;</span><span class="p">;</span><span class="kd">let</span> <span class="nx">vod_id</span><span class="o">=</span><span class="nx">orId</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">rule</span><span class="p">.</span><span class="nx">二级</span><span class="o">===</span><span class="s2">&#34;*&#34;</span><span class="p">)</span><span class="p">{</span><span class="kd">let</span> <span class="nx">extra</span><span class="o">=</span><span class="nx">orId</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span><span class="s2">&#34;@@&#34;</span><span class="p">)</span><span class="p">;</span><span class="nx">vod_name</span><span class="o">=</span><span class="nx">extra</span><span class="p">.</span><span class="nx">length</span><span class="o">&gt;</span><span class="mi">1</span><span class="o">?</span><span class="nx">extra</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="o">:</span><span class="nx">vod_name</span><span class="p">;</span><span class="nx">vod_pic</span><span class="o">=</span><span class="nx">extra</span><span class="p">.</span><span class="nx">length</span><span class="o">&gt;</span><span class="mi">2</span><span class="o">?</span><span class="nx">extra</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span><span class="o">:</span><span class="nx">vod_pic</span><span class="p">}</span><span class="kd">let</span> <span class="nx">vod</span><span class="o">=</span><span class="p">{</span><span class="nx">vod_id</span><span class="o">:</span><span class="nx">vod_id</span><span class="p">,</span><span class="nx">vod_name</span><span class="o">:</span><span class="nx">vod_name</span><span class="p">,</span><span class="nx">vod_pic</span><span class="o">:</span><span class="nx">vod_pic</span><span class="p">,</span><span class="nx">type_name</span><span class="o">:</span><span class="s2">&#34;类型&#34;</span><span class="p">,</span><span class="nx">vod_year</span><span class="o">:</span><span class="s2">&#34;年份&#34;</span><span class="p">,</span><span class="nx">vod_area</span><span class="o">:</span><span class="s2">&#34;地区&#34;</span><span class="p">,</span><span class="nx">vod_remarks</span><span class="o">:</span><span class="s2">&#34;更新信息&#34;</span><span class="p">,</span><span class="nx">vod_actor</span><span class="o">:</span><span class="s2">&#34;主演&#34;</span><span class="p">,</span><span class="nx">vod_director</span><span class="o">:</span><span class="s2">&#34;导演&#34;</span><span class="p">,</span><span class="nx">vod_content</span><span class="o">:</span><span class="s2">&#34;简介&#34;</span><span class="p">}</span><span class="p">;</span><span class="kd">let</span> <span class="nx">p</span><span class="o">=</span><span class="nx">detailObj</span><span class="p">.</span><span class="nx">二级</span><span class="p">;</span><span class="kd">let</span> <span class="nx">url</span><span class="o">=</span><span class="nx">detailObj</span><span class="p">.</span><span class="nx">url</span><span class="p">;</span><span class="kd">let</span> <span class="nx">detailUrl</span><span class="o">=</span><span class="nx">detailObj</span><span class="p">.</span><span class="nx">detailUrl</span><span class="p">;</span><span class="kd">let</span> <span class="nx">fyclass</span><span class="o">=</span><span class="nx">detailObj</span><span class="p">.</span><span class="nx">fyclass</span><span class="p">;</span><span class="kd">let</span> <span class="nx">tab_exclude</span><span class="o">=</span><span class="nx">detailObj</span><span class="p">.</span><span class="nx">tab_exclude</span><span class="p">;</span><span class="kd">let</span> <span class="nx">html</span><span class="o">=</span><span class="nx">detailObj</span><span class="p">.</span><span class="nx">html</span><span class="o">||</span><span class="s2">&#34;&#34;</span><span class="p">;</span><span class="nx">MY_URL</span><span class="o">=</span><span class="nx">url</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">detailObj</span><span class="p">.</span><span class="nx">二级访问前</span><span class="p">)</span><span class="p">{</span><span class="k">try</span><span class="p">{</span><span class="nx">print</span><span class="p">(</span><span class="sb">`</span><span class="sb">尝试在二级访问前执行代码:</span><span class="si">${</span><span class="nx">detailObj</span><span class="p">.</span><span class="nx">二级访问前</span><span class="si">}</span><span class="sb">`</span><span class="p">)</span><span class="p">;</span><span class="nb">eval</span><span class="p">(</span><span class="nx">detailObj</span><span class="p">.</span><span class="nx">二级访问前</span><span class="p">.</span><span class="nx">trim</span><span class="p">(</span><span class="p">)</span><span class="p">.</span><span class="nx">replace</span><span class="p">(</span><span class="s2">&#34;js:&#34;</span><span class="p">,</span><span class="s2">&#34;&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">}</span><span class="k">catch</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span><span class="p">{</span><span class="nx">print</span><span class="p">(</span><span class="sb">`</span><span class="sb">二级访问前执行代码出现错误:</span><span class="si">${</span><span class="nx">e</span><span class="p">.</span><span class="nx">message</span><span class="si">}</span><span class="sb">`</span><span class="p">)</span><span class="p">}</span><span class="p">}</span><span class="k">if</span><span class="p">(</span><span class="nx">p</span><span class="o">===</span><span class="s2">&#34;*&#34;</span><span class="p">)</span><span class="p">{</span><span class="nx">vod</span><span class="p">.</span><span class="nx">vod_play_from</span><span class="o">=</span><span class="s2">&#34;&#34;</span><span class="p">;</span><span class="nx">vod</span><span class="p">.</span><span class="nx">vod_remarks</span><span class="o">=</span><span class="nx">detailUrl</span><span class="p">;</span><span class="nx">vod</span><span class="p">.</span><span class="nx">vod_actor</span><span class="o">=</span><span class="s2">&#34;没有二级,只有一级链接直接嗅探播放&#34;</span><span class="p">;</span><span class="nx">vod</span><span class="p">.</span><span class="nx">vod_content</span><span class="o">=</span><span class="nx">MY_URL</span><span class="p">;</span><span class="nx">vod</span><span class="p">.</span><span class="nx">vod_play_url</span><span class="o">=</span><span class="s2">&#34;嗅探播放$&#34;</span><span class="o">+</span><span class="nx">MY_URL</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span><span class="s2">&#34;@@&#34;</span><span class="p">)</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="p">}</span><span class="k">else</span> <span class="k">if</span><span class="p">(</span><span class="k">typeof</span> <span class="nx">p</span><span class="o">===</span><span class="s2">&#34;string&#34;</span><span class="o">&amp;&amp;</span><span class="nx">p</span><span class="p">.</span><span class="nx">trim</span><span class="p">(</span><span class="p">)</span><span class="p">.</span><span class="nx">startsWith</span><span class="p">(</span><span class="s2">&#34;js:&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="kr">const</span> <span class="nx">TYPE</span><span class="o">=</span><span class="s2">&#34;detail&#34;</span><span class="p">;</span><span class="kd">var</span> <span class="nx">input</span><span class="o">=</span><span class="nx">MY_URL</span><span class="p">;</span><span class="kd">var</span> <span class="nx">play_url</span><span class="o">=</span><span class="s2">&#34;&#34;</span><span class="p">;</span><span class="nb">eval</span><span class="p">(</span><span class="nx">p</span><span class="p">.</span><span class="nx">trim</span><span class="p">(</span><span class="p">)</span><span class="p">.</span><span class="nx">replace</span><span class="p">(</span><span class="s2">&#34;js:&#34;</span><span class="p">,</span><span class="s2">&#34;&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">;</span><span class="nx">vod</span><span class="o">=</span><span class="nx">VOD</span><span class="p">;</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span><span class="nx">vod</span><span class="p">)</span><span class="p">)</span><span class="p">}</span><span class="k">else</span> <span class="k">if</span><span class="p">(</span><span class="nx">p</span><span class="o">&amp;&amp;</span><span class="k">typeof</span> <span class="nx">p</span><span class="o">===</span><span class="s2">&#34;object&#34;</span><span class="p">)</span><span class="p">{</span><span class="kd">let</span> <span class="nx">tt1</span><span class="o">=</span><span class="p">(</span><span class="k">new</span> <span class="nb">Date</span><span class="p">)</span><span class="p">.</span><span class="nx">getTime</span><span class="p">(</span><span class="p">)</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="nx">html</span><span class="p">)</span><span class="p">{</span><span class="nx">html</span><span class="o">=</span><span class="nx">getHtml</span><span class="p">(</span><span class="nx">MY_URL</span><span class="p">)</span><span class="p">}</span><span class="nx">print</span><span class="p">(</span><span class="sb">`</span><span class="sb">二级</span><span class="si">${</span><span class="nx">MY_URL</span><span class="si">}</span><span class="sb">仅获取源码耗时:</span><span class="si">${</span><span class="p">(</span><span class="k">new</span> <span class="nb">Date</span><span class="p">)</span><span class="p">.</span><span class="nx">getTime</span><span class="p">(</span><span class="p">)</span><span class="o">-</span><span class="nx">tt1</span><span class="si">}</span><span class="sb">毫秒</span><span class="sb">`</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">_ps</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">p</span><span class="p">.</span><span class="nx">is_json</span><span class="p">)</span><span class="p">{</span><span class="nx">print</span><span class="p">(</span><span class="s2">&#34;二级是json&#34;</span><span class="p">)</span><span class="p">;</span><span class="nx">_ps</span><span class="o">=</span><span class="nx">parseTags</span><span class="p">.</span><span class="nx">json</span><span class="p">;</span><span class="nx">html</span><span class="o">=</span><span class="nx">dealJson</span><span class="p">(</span><span class="nx">html</span><span class="p">)</span><span class="p">}</span><span class="k">else</span> <span class="k">if</span><span class="p">(</span><span class="nx">p</span><span class="p">.</span><span class="nx">is_jsp</span><span class="p">)</span><span class="p">{</span><span class="nx">print</span><span class="p">(</span><span class="s2">&#34;二级是jsp&#34;</span><span class="p">)</span><span class="p">;</span><span class="nx">_ps</span><span class="o">=</span><span class="nx">parseTags</span><span class="p">.</span><span class="nx">jsp</span><span class="p">}</span><span class="k">else</span> <span class="k">if</span><span class="p">(</span><span class="nx">p</span><span class="p">.</span><span class="nx">is_jq</span><span class="p">)</span><span class="p">{</span><span class="nx">print</span><span class="p">(</span><span class="s2">&#34;二级是jq&#34;</span><span class="p">)</span><span class="p">;</span><span class="nx">_ps</span><span class="o">=</span><span class="nx">parseTags</span><span class="p">.</span><span class="nx">jq</span><span class="p">}</span><span class="k">else</span><span class="p">{</span><span class="nx">print</span><span class="p">(</span><span class="s2">&#34;二级默认jq&#34;</span><span class="p">)</span><span class="p">;</span><span class="nx">_ps</span><span class="o">=</span><span class="nx">parseTags</span><span class="p">.</span><span class="nx">jq</span><span class="p">}</span><span class="kd">let</span> <span class="nx">tt2</span><span class="o">=</span><span class="p">(</span><span class="k">new</span> <span class="nb">Date</span><span class="p">)</span><span class="p">.</span><span class="nx">getTime</span><span class="p">(</span><span class="p">)</span><span class="p">;</span><span class="nx">print</span><span class="p">(</span><span class="sb">`</span><span class="sb">二级</span><span class="si">${</span><span class="nx">MY_URL</span><span class="si">}</span><span class="sb">获取并装载源码耗时:</span><span class="si">${</span><span class="nx">tt2</span><span class="o">-</span><span class="nx">tt1</span><span class="si">}</span><span class="sb">毫秒</span><span class="sb">`</span><span class="p">)</span><span class="p">;</span><span class="nx">_pdfa</span><span class="o">=</span><span class="nx">_ps</span><span class="p">.</span><span class="nx">pdfa</span><span class="p">;</span><span class="nx">_pdfh</span><span class="o">=</span><span class="nx">_ps</span><span class="p">.</span><span class="nx">pdfh</span><span class="p">;</span><span class="nx">_pd</span><span class="o">=</span><span class="nx">_ps</span><span class="p">.</span><span class="nx">pd</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">p</span><span class="p">.</span><span class="nx">title</span><span class="p">)</span><span class="p">{</span><span class="kd">let</span> <span class="nx">p1</span><span class="o">=</span><span class="nx">p</span><span class="p">.</span><span class="nx">title</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span><span class="s2">&#34;;&#34;</span><span class="p">)</span><span class="p">;</span><span class="nx">vod</span><span class="p">.</span><span class="nx">vod_name</span><span class="o">=</span><span class="nx">_pdfh</span><span class="p">(</span><span class="nx">html</span><span class="p">,</span><span class="nx">p1</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="p">)</span><span class="p">.</span><span class="nx">replace</span><span class="p">(</span><span class="sr">/\n|\t/g</span><span class="p">,</span><span class="s2">&#34;&#34;</span><span class="p">)</span><span class="p">.</span><span class="nx">trim</span><span class="p">(</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">type_name</span><span class="o">=</span><span class="nx">p1</span><span class="p">.</span><span class="nx">length</span><span class="o">&gt;</span><span class="mi">1</span><span class="o">?</span><span class="nx">_pdfh</span><span class="p">(</span><span class="nx">html</span><span class="p">,</span><span class="nx">p1</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="p">)</span><span class="p">.</span><span class="nx">replace</span><span class="p">(</span><span class="sr">/\n|\t/g</span><span class="p">,</span><span class="s2">&#34;&#34;</span><span class="p">)</span><span class="p">.</span><span class="nx">replace</span><span class="p">(</span><span class="sr">/ /g</span><span class="p">,</span><span class="s2">&#34;&#34;</span><span class="p">)</span><span class="p">.</span><span class="nx">trim</span><span class="p">(</span><span class="p">)</span><span class="o">:</span><span class="s2">&#34;&#34;</span><span class="p">;</span><span class="nx">vod</span><span class="p">.</span><span class="nx">type_name</span><span class="o">=</span><span class="nx">type_name</span><span class="o">||</span><span class="nx">vod</span><span class="p">.</span><span class="nx">type_name</span><span class="p">}</span><span class="k">if</span><span class="p">(</span><span class="nx">p</span><span class="p">.</span><span class="nx">desc</span><span class="p">)</span><span class="p">{</span><span class="k">try</span><span class="p">{</span><span class="kd">let</span> <span class="nx">p1</span><span class="o">=</span><span class="nx">p</span><span class="p">.</span><span class="nx">desc</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span><span class="s2">&#34;;&#34;</span><span class="p">)</span><span class="p">;</span><span class="nx">vod</span><span class="p">.</span><span class="nx">vod_remarks</span><span class="o">=</span><span class="nx">_pdfh</span><span class="p">(</span><span class="nx">html</span><span class="p">,</span><span class="nx">p1</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="p">)</span><span class="p">.</span><span class="nx">replace</span><span class="p">(</span><span class="sr">/\n|\t/g</span><span class="p">,</span><span class="s2">&#34;&#34;</span><span class="p">)</span><span class="p">.</span><span class="nx">trim</span><span class="p">(</span><span class="p">)</span><span class="p">;</span><span class="nx">vod</span><span class="p">.</span><span class="nx">vod_year</span><span class="o">=</span><span class="nx">p1</span><span class="p">.</span><span class="nx">length</span><span class="o">&gt;</span><span class="mi">1</span><span class="o">?</span><span class="nx">_pdfh</span><span class="p">(</span><span class="nx">html</span><span class="p">,</span><span class="nx">p1</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="p">)</span><span class="p">.</span><span class="nx">replace</span><span class="p">(</span><span class="sr">/\n|\t/g</span><span class="p">,</span><span class="s2">&#34;&#34;</span><span class="p">)</span><span class="p">.</span><span class="nx">trim</span><span class="p">(</span><span class="p">)</span><span class="o">:</span><span class="s2">&#34;&#34;</span><span class="p">;</span><span class="nx">vod</span><span class="p">.</span><span class="nx">vod_area</span><span class="o">=</span><span class="nx">p1</span><span class="p">.</span><span class="nx">length</span><span class="o">&gt;</span><span class="mi">2</span><span class="o">?</span><span class="nx">_pdfh</span><span class="p">(</span><span class="nx">html</span><span class="p">,</span><span class="nx">p1</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span><span class="p">)</span><span class="p">.</span><span class="nx">replace</span><span class="p">(</span><span class="sr">/\n|\t/g</span><span class="p">,</span><span class="s2">&#34;&#34;</span><span class="p">)</span><span class="p">.</span><span class="nx">trim</span><span class="p">(</span><span class="p">)</span><span class="o">:</span><span class="s2">&#34;&#34;</span><span class="p">;</span><span class="nx">vod</span><span class="p">.</span><span class="nx">vod_actor</span><span class="o">=</span><span class="nx">p1</span><span class="p">.</span><span class="nx">length</span><span class="o">&gt;</span><span class="mi">3</span><span class="o">?</span><span class="nx">_pdfh</span><span class="p">(</span><span class="nx">html</span><span class="p">,</span><span class="nx">p1</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span><span class="p">)</span><span class="p">.</span><span class="nx">replace</span><span class="p">(</span><span class="sr">/\n|\t/g</span><span class="p">,</span><span class="s2">&#34;&#34;</span><span class="p">)</span><span class="p">.</span><span class="nx">trim</span><span class="p">(</span><span class="p">)</span><span class="o">:</span><span class="s2">&#34;&#34;</span><span class="p">;</span><span class="nx">vod</span><span class="p">.</span><span class="nx">vod_director</span><span class="o">=</span><span class="nx">p1</span><span class="p">.</span><span class="nx">length</span><span class="o">&gt;</span><span class="mi">4</span><span class="o">?</span><span class="nx">_pdfh</span><span class="p">(</span><span class="nx">html</span><span class="p">,</span><span class="nx">p1</span><span class="p">[</span><span class="mi">4</span><span class="p">]</span><span class="p">)</span><span class="p">.</span><span class="nx">replace</span><span class="p">(</span><span class="sr">/\n|\t/g</span><span class="p">,</span><span class="s2">&#34;&#34;</span><span class="p">)</span><span class="p">.</span><span class="nx">trim</span><span class="p">(</span><span class="p">)</span><span class="o">:</span><span class="s2">&#34;&#34;</span><span class="p">}</span><span class="k">catch</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span><span class="p">{</span><span class="p">}</span><span class="p">}</span><span class="k">if</span><span class="p">(</span><span class="nx">p</span><span class="p">.</span><span class="nx">content</span><span class="p">)</span><span class="p">{</span><span class="k">try</span><span class="p">{</span><span class="kd">let</span> <span class="nx">p1</span><span class="o">=</span><span class="nx">p</span><span class="p">.</span><span class="nx">content</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span><span class="s2">&#34;;&#34;</span><span class="p">)</span><span class="p">;</span><span class="nx">vod</span><span class="p">.</span><span class="nx">vod_content</span><span class="o">=</span><span class="nx">_pdfh</span><span class="p">(</span><span class="nx">html</span><span class="p">,</span><span class="nx">p1</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="p">)</span><span class="p">.</span><span class="nx">replace</span><span class="p">(</span><span class="sr">/\n|\t/g</span><span class="p">,</span><span class="s2">&#34;&#34;</span><span class="p">)</span><span class="p">.</span><span class="nx">trim</span><span class="p">(</span><span class="p">)</span><span class="p">}</span><span class="k">catch</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span><span class="p">{</span><span class="p">}</span><span class="p">}</span><span class="k">if</span><span class="p">(</span><span class="nx">p</span><span class="p">.</span><span class="nx">img</span><span class="p">)</span><span class="p">{</span><span class="k">try</span><span class="p">{</span><span class="kd">let</span> <span class="nx">p1</span><span class="o">=</span><span class="nx">p</span><span class="p">.</span><span class="nx">img</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span><span class="s2">&#34;;&#34;</span><span class="p">)</span><span class="p">;</span><span class="nx">vod</span><span class="p">.</span><span class="nx">vod_pic</span><span class="o">=</span><span class="nx">_pd</span><span class="p">(</span><span class="nx">html</span><span class="p">,</span><span class="nx">p1</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="p">,</span><span class="nx">MY_URL</span><span class="p">)</span><span class="p">}</span><span class="k">catch</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span><span class="p">{</span><span class="p">}</span><span class="p">}</span><span class="kd">let</span> <span class="nx">vod_play_from</span><span class="o">=</span><span class="s2">&#34;$$$&#34;</span><span class="p">;</span><span class="kd">let</span> <span class="nx">playFrom</span><span class="o">=</span><span class="p">[</span><span class="p">]</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">p</span><span class="p">.</span><span class="nx">重定向</span><span class="o">&amp;&amp;</span><span class="nx">p</span><span class="p">.</span><span class="nx">重定向</span><span class="p">.</span><span class="nx">startsWith</span><span class="p">(</span><span class="s2">&#34;js:&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="nx">print</span><span class="p">(</span><span class="s2">&#34;开始执行重定向代码:&#34;</span><span class="o">+</span><span class="nx">p</span><span class="p">.</span><span class="nx">重定向</span><span class="p">)</span><span class="p">;</span><span class="nx">html</span><span class="o">=</span><span class="nb">eval</span><span class="p">(</span><span class="nx">p</span><span class="p">.</span><span class="nx">重定向</span><span class="p">.</span><span class="nx">replace</span><span class="p">(</span><span class="s2">&#34;js:&#34;</span><span class="p">,</span><span class="s2">&#34;&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">}</span><span class="k">if</span><span class="p">(</span><span class="nx">p</span><span class="p">.</span><span class="nx">tabs</span><span class="p">)</span><span class="p">{</span><span class="k">if</span><span class="p">(</span><span class="nx">p</span><span class="p">.</span><span class="nx">tabs</span><span class="p">.</span><span class="nx">startsWith</span><span class="p">(</span><span class="s2">&#34;js:&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="nx">print</span><span class="p">(</span><span class="s2">&#34;开始执行tabs代码:&#34;</span><span class="o">+</span><span class="nx">p</span><span class="p">.</span><span class="nx">tabs</span><span class="p">)</span><span class="p">;</span><span class="kd">var</span> <span class="nx">input</span><span class="o">=</span><span class="nx">MY_URL</span><span class="p">;</span><span class="nb">eval</span><span class="p">(</span><span class="nx">p</span><span class="p">.</span><span class="nx">tabs</span><span class="p">.</span><span class="nx">replace</span><span class="p">(</span><span class="s2">&#34;js:&#34;</span><span class="p">,</span><span class="s2">&#34;&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">;</span><span class="nx">playFrom</span><span class="o">=</span><span class="nx">TABS</span><span class="p">}</span><span class="k">else</span><span class="p">{</span><span class="kd">let</span> <span class="nx">p_tab</span><span class="o">=</span><span class="nx">p</span><span class="p">.</span><span class="nx">tabs</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span><span class="s2">&#34;;&#34;</span><span class="p">)</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="p">;</span><span class="kd">let</span> <span class="nx">vHeader</span><span class="o">=</span><span class="nx">_pdfa</span><span class="p">(</span><span class="nx">html</span><span class="p">,</span><span class="nx">p_tab</span><span class="p">)</span><span class="p">;</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">vHeader</span><span class="p">.</span><span class="nx">length</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">tab_text</span><span class="o">=</span><span class="nx">p</span><span class="p">.</span><span class="nx">tab_text</span><span class="o">||</span><span class="s2">&#34;body&amp;&amp;Text&#34;</span><span class="p">;</span><span class="kd">let</span> <span class="nx">new_map</span><span class="o">=</span><span class="p">{</span><span class="p">}</span><span class="p">;</span><span class="k">for</span><span class="p">(</span><span class="kd">let</span> <span class="nx">v</span> <span class="k">of</span> <span class="nx">vHeader</span><span class="p">)</span><span class="p">{</span><span class="kd">let</span> <span class="nx">v_title</span><span class="o">=</span><span class="nx">_pdfh</span><span class="p">(</span><span class="nx">v</span><span class="p">,</span><span class="nx">tab_text</span><span class="p">)</span><span class="p">.</span><span class="nx">trim</span><span class="p">(</span><span class="p">)</span><span class="p">;</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">v_title</span><span class="p">)</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">tab_exclude</span><span class="o">&amp;&amp;</span><span class="k">new</span> <span class="nb">RegExp</span><span class="p">(</span><span class="nx">tab_exclude</span><span class="p">)</span><span class="p">.</span><span class="nx">test</span><span class="p">(</span><span class="nx">v_title</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="k">continue</span><span class="p">}</span><span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="nx">new_map</span><span class="p">.</span><span class="nx">hasOwnProperty</span><span class="p">(</span><span class="nx">v_title</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="nx">new_map</span><span class="p">[</span><span class="nx">v_title</span><span class="p">]</span><span class="o">=</span><span class="mi">1</span><span class="p">}</span><span class="k">else</span><span class="p">{</span><span class="nx">new_map</span><span class="p">[</span><span class="nx">v_title</span><span class="p">]</span><span class="o">+=</span><span class="mi">1</span><span class="p">}</span><span class="k">if</span><span class="p">(</span><span class="nx">new_map</span><span class="p">[</span><span class="nx">v_title</span><span class="p">]</span><span class="o">&gt;</span><span class="mi">1</span><span class="p">)</span><span class="p">{</span><span class="nx">v_title</span><span class="o">+=</span><span class="nb">Number</span><span class="p">(</span><span class="nx">new_map</span><span class="p">[</span><span class="nx">v_title</span><span class="p">]</span><span class="o">-</span><span class="mi">1</span><span class="p">)</span><span class="p">}</span><span class="nx">playFrom</span><span class="p">.</span><span class="nx">push</span><span class="p">(</span><span class="nx">v_title</span><span class="p">)</span><span class="p">}</span><span class="p">}</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span><span class="nx">playFrom</span><span class="p">)</span><span class="p">)</span><span class="p">}</span><span class="k">else</span><span class="p">{</span><span class="nx">playFrom</span><span class="o">=</span><span class="p">[</span><span class="s2">&#34;&#34;</span><span class="p">]</span><span class="p">}</span><span class="nx">vod</span><span class="p">.</span><span class="nx">vod_play_from</span><span class="o">=</span><span class="nx">playFrom</span><span class="p">.</span><span class="nx">join</span><span class="p">(</span><span class="nx">vod_play_from</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">vod_play_url</span><span class="o">=</span><span class="s2">&#34;$$$&#34;</span><span class="p">;</span><span class="kd">let</span> <span class="nx">vod_tab_list</span><span class="o">=</span><span class="p">[</span><span class="p">]</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">p</span><span class="p">.</span><span class="nx">lists</span><span class="p">)</span><span class="p">{</span><span class="k">if</span><span class="p">(</span><span class="nx">p</span><span class="p">.</span><span class="nx">lists</span><span class="p">.</span><span class="nx">startsWith</span><span class="p">(</span><span class="s2">&#34;js:&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="nx">print</span><span class="p">(</span><span class="s2">&#34;开始执行lists代码:&#34;</span><span class="o">+</span><span class="nx">p</span><span class="p">.</span><span class="nx">lists</span><span class="p">)</span><span class="p">;</span><span class="k">try</span><span class="p">{</span><span class="kd">var</span> <span class="nx">input</span><span class="o">=</span><span class="nx">MY_URL</span><span class="p">;</span><span class="kd">var</span> <span class="nx">play_url</span><span class="o">=</span><span class="s2">&#34;&#34;</span><span class="p">;</span><span class="nb">eval</span><span class="p">(</span><span class="nx">p</span><span class="p">.</span><span class="nx">lists</span><span class="p">.</span><span class="nx">replace</span><span class="p">(</span><span class="s2">&#34;js:&#34;</span><span class="p">,</span><span class="s2">&#34;&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">;</span><span class="k">for</span><span class="p">(</span><span class="kd">let</span> <span class="nx">i</span> <span class="k">in</span> <span class="nx">LISTS</span><span class="p">)</span><span class="p">{</span><span class="k">if</span><span class="p">(</span><span class="nx">LISTS</span><span class="p">.</span><span class="nx">hasOwnProperty</span><span class="p">(</span><span class="nx">i</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="k">try</span><span class="p">{</span><span class="nx">LISTS</span><span class="p">[</span><span class="nx">i</span><span class="p">]</span><span class="o">=</span><span class="nx">LISTS</span><span class="p">[</span><span class="nx">i</span><span class="p">]</span><span class="p">.</span><span class="nx">map</span><span class="p">(</span><span class="nx">it</span><span class="p">=&gt;</span><span class="nx">it</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span><span class="s2">&#34;$&#34;</span><span class="p">)</span><span class="p">.</span><span class="nx">slice</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="mi">2</span><span class="p">)</span><span class="p">.</span><span class="nx">join</span><span class="p">(</span><span class="s2">&#34;$&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">}</span><span class="k">catch</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span><span class="p">{</span><span class="nx">print</span><span class="p">(</span><span class="s2">&#34;格式化LISTS发生错误:&#34;</span><span class="o">+</span><span class="nx">e</span><span class="p">.</span><span class="nx">message</span><span class="p">)</span><span class="p">}</span><span class="p">}</span><span class="p">}</span><span class="nx">vod_play_url</span><span class="o">=</span><span class="nx">LISTS</span><span class="p">.</span><span class="nx">map</span><span class="p">(</span><span class="nx">it</span><span class="p">=&gt;</span><span class="nx">it</span><span class="p">.</span><span class="nx">join</span><span class="p">(</span><span class="s2">&#34;#&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">.</span><span class="nx">join</span><span class="p">(</span><span class="nx">vod_play_url</span><span class="p">)</span><span class="p">}</span><span class="k">catch</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span><span class="p">{</span><span class="nx">print</span><span class="p">(</span><span class="s2">&#34;js执行lists: 发生错误:&#34;</span><span class="o">+</span><span class="nx">e</span><span class="p">.</span><span class="nx">message</span><span class="p">)</span><span class="p">}</span><span class="p">}</span><span class="k">else</span><span class="p">{</span><span class="kd">let</span> <span class="nx">list_text</span><span class="o">=</span><span class="nx">p</span><span class="p">.</span><span class="nx">list_text</span><span class="o">||</span><span class="s2">&#34;body&amp;&amp;Text&#34;</span><span class="p">;</span><span class="kd">let</span> <span class="nx">list_url</span><span class="o">=</span><span class="nx">p</span><span class="p">.</span><span class="nx">list_url</span><span class="o">||</span><span class="s2">&#34;a&amp;&amp;href&#34;</span><span class="p">;</span><span class="kd">let</span> <span class="nx">is_tab_js</span><span class="o">=</span><span class="nx">p</span><span class="p">.</span><span class="nx">tabs</span><span class="p">.</span><span class="nx">trim</span><span class="p">(</span><span class="p">)</span><span class="p">.</span><span class="nx">startsWith</span><span class="p">(</span><span class="s2">&#34;js:&#34;</span><span class="p">)</span><span class="p">;</span><span class="k">for</span><span class="p">(</span><span class="kd">let</span> <span class="nx">i</span><span class="o">=</span><span class="mi">0</span><span class="p">;</span><span class="nx">i</span><span class="o">&lt;</span><span class="nx">playFrom</span><span class="p">.</span><span class="nx">length</span><span class="p">;</span><span class="nx">i</span><span class="o">++</span><span class="p">)</span><span class="p">{</span><span class="kd">let</span> <span class="nx">tab_name</span><span class="o">=</span><span class="nx">playFrom</span><span class="p">[</span><span class="nx">i</span><span class="p">]</span><span class="p">;</span><span class="kd">let</span> <span class="nx">tab_ext</span><span class="o">=</span><span class="nx">p</span><span class="p">.</span><span class="nx">tabs</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span><span class="s2">&#34;;&#34;</span><span class="p">)</span><span class="p">.</span><span class="nx">length</span><span class="o">&gt;</span><span class="mi">1</span><span class="o">&amp;&amp;</span><span class="o">!</span><span class="nx">is_tab_js</span><span class="o">?</span><span class="nx">p</span><span class="p">.</span><span class="nx">tabs</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span><span class="s2">&#34;;&#34;</span><span class="p">)</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="o">:</span><span class="s2">&#34;&#34;</span><span class="p">;</span><span class="kd">let</span> <span class="nx">p1</span><span class="o">=</span><span class="nx">p</span><span class="p">.</span><span class="nx">lists</span><span class="p">.</span><span class="nx">replaceAll</span><span class="p">(</span><span class="s2">&#34;#idv&#34;</span><span class="p">,</span><span class="nx">tab_name</span><span class="p">)</span><span class="p">.</span><span class="nx">replaceAll</span><span class="p">(</span><span class="s2">&#34;#id&#34;</span><span class="p">,</span><span class="nx">i</span><span class="p">)</span><span class="p">;</span><span class="nx">tab_ext</span><span class="o">=</span><span class="nx">tab_ext</span><span class="p">.</span><span class="nx">replaceAll</span><span class="p">(</span><span class="s2">&#34;#idv&#34;</span><span class="p">,</span><span class="nx">tab_name</span><span class="p">)</span><span class="p">.</span><span class="nx">replaceAll</span><span class="p">(</span><span class="s2">&#34;#id&#34;</span><span class="p">,</span><span class="nx">i</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">tabName</span><span class="o">=</span><span class="nx">tab_ext</span><span class="o">?</span><span class="nx">_pdfh</span><span class="p">(</span><span class="nx">html</span><span class="p">,</span><span class="nx">tab_ext</span><span class="p">)</span><span class="o">:</span><span class="nx">tab_name</span><span class="p">;</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">tabName</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">new_vod_list</span><span class="o">=</span><span class="p">[</span><span class="p">]</span><span class="p">;</span><span class="kd">let</span> <span class="nx">tt1</span><span class="o">=</span><span class="p">(</span><span class="k">new</span> <span class="nb">Date</span><span class="p">)</span><span class="p">.</span><span class="nx">getTime</span><span class="p">(</span><span class="p">)</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="k">typeof</span> <span class="nx">pdfl</span><span class="o">===</span><span class="s2">&#34;function&#34;</span><span class="p">)</span><span class="p">{</span><span class="nx">new_vod_list</span><span class="o">=</span><span class="nx">pdfl</span><span class="p">(</span><span class="nx">html</span><span class="p">,</span><span class="nx">p1</span><span class="p">,</span><span class="nx">list_text</span><span class="p">,</span><span class="nx">list_url</span><span class="p">,</span><span class="nx">MY_URL</span><span class="p">)</span><span class="p">}</span><span class="k">else</span><span class="p">{</span><span class="kd">let</span> <span class="nx">vodList</span><span class="o">=</span><span class="p">[</span><span class="p">]</span><span class="p">;</span><span class="k">try</span><span class="p">{</span><span class="nx">vodList</span><span class="o">=</span><span class="nx">_pdfa</span><span class="p">(</span><span class="nx">html</span><span class="p">,</span><span class="nx">p1</span><span class="p">)</span><span class="p">;</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="s2">&#34;len(vodList):&#34;</span><span class="o">+</span><span class="nx">vodList</span><span class="p">.</span><span class="nx">length</span><span class="p">)</span><span class="p">}</span><span class="k">catch</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span><span class="p">{</span><span class="p">}</span><span class="k">for</span><span class="p">(</span><span class="kd">let</span> <span class="nx">i</span><span class="o">=</span><span class="mi">0</span><span class="p">;</span><span class="nx">i</span><span class="o">&lt;</span><span class="nx">vodList</span><span class="p">.</span><span class="nx">length</span><span class="p">;</span><span class="nx">i</span><span class="o">++</span><span class="p">)</span><span class="p">{</span><span class="kd">let</span> <span class="nx">it</span><span class="o">=</span><span class="nx">vodList</span><span class="p">[</span><span class="nx">i</span><span class="p">]</span><span class="p">;</span><span class="nx">new_vod_list</span><span class="p">.</span><span class="nx">push</span><span class="p">(</span><span class="nx">_pdfh</span><span class="p">(</span><span class="nx">it</span><span class="p">,</span><span class="nx">list_text</span><span class="p">)</span><span class="p">.</span><span class="nx">trim</span><span class="p">(</span><span class="p">)</span><span class="o">+</span><span class="s2">&#34;$&#34;</span><span class="o">+</span><span class="nx">_pd</span><span class="p">(</span><span class="nx">it</span><span class="p">,</span><span class="nx">list_url</span><span class="p">,</span><span class="nx">MY_URL</span><span class="p">)</span><span class="p">)</span><span class="p">}</span><span class="p">}</span><span class="k">if</span><span class="p">(</span><span class="nx">new_vod_list</span><span class="p">.</span><span class="nx">length</span><span class="o">&gt;</span><span class="mi">0</span><span class="p">)</span><span class="p">{</span><span class="nx">new_vod_list</span><span class="o">=</span><span class="nx">forceOrder</span><span class="p">(</span><span class="nx">new_vod_list</span><span class="p">,</span><span class="s2">&#34;&#34;</span><span class="p">,</span><span class="nx">x</span><span class="p">=&gt;</span><span class="nx">x</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span><span class="s2">&#34;$&#34;</span><span class="p">)</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="p">)</span><span class="p">;</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="sb">`</span><span class="sb">drpy影响性能代码共计列表数循环次数:</span><span class="si">${</span><span class="nx">new_vod_list</span><span class="p">.</span><span class="nx">length</span><span class="si">}</span><span class="sb">,耗时:</span><span class="si">${</span><span class="p">(</span><span class="k">new</span> <span class="nb">Date</span><span class="p">)</span><span class="p">.</span><span class="nx">getTime</span><span class="p">(</span><span class="p">)</span><span class="o">-</span><span class="nx">tt1</span><span class="si">}</span><span class="sb">毫秒</span><span class="sb">`</span><span class="p">)</span><span class="p">}</span><span class="kd">let</span> <span class="nx">vlist</span><span class="o">=</span><span class="nx">new_vod_list</span><span class="p">.</span><span class="nx">join</span><span class="p">(</span><span class="s2">&#34;#&#34;</span><span class="p">)</span><span class="p">;</span><span class="nx">vod_tab_list</span><span class="p">.</span><span class="nx">push</span><span class="p">(</span><span class="nx">vlist</span><span class="p">)</span><span class="p">}</span><span class="nx">vod_play_url</span><span class="o">=</span><span class="nx">vod_tab_list</span><span class="p">.</span><span class="nx">join</span><span class="p">(</span><span class="nx">vod_play_url</span><span class="p">)</span><span class="p">}</span><span class="p">}</span><span class="nx">vod</span><span class="p">.</span><span class="nx">vod_play_url</span><span class="o">=</span><span class="nx">vod_play_url</span><span class="p">}</span><span class="k">if</span><span class="p">(</span><span class="nx">rule</span><span class="p">.</span><span class="nx">图片来源</span><span class="o">&amp;&amp;</span><span class="nx">vod</span><span class="p">.</span><span class="nx">vod_pic</span><span class="o">&amp;&amp;</span><span class="nx">vod</span><span class="p">.</span><span class="nx">vod_pic</span><span class="p">.</span><span class="nx">startsWith</span><span class="p">(</span><span class="s2">&#34;http&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="nx">vod</span><span class="p">.</span><span class="nx">vod_pic</span><span class="o">=</span><span class="nx">vod</span><span class="p">.</span><span class="nx">vod_pic</span><span class="o">+</span><span class="nx">rule</span><span class="p">.</span><span class="nx">图片来源</span><span class="p">}</span><span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="nx">vod</span><span class="p">.</span><span class="nx">vod_id</span><span class="o">||</span><span class="nx">vod_id</span><span class="p">.</span><span class="nx">includes</span><span class="p">(</span><span class="s2">&#34;$&#34;</span><span class="p">)</span><span class="o">&amp;&amp;</span><span class="nx">vod</span><span class="p">.</span><span class="nx">vod_id</span><span class="o">!==</span><span class="nx">vod_id</span><span class="p">)</span><span class="p">{</span><span class="nx">vod</span><span class="p">.</span><span class="nx">vod_id</span><span class="o">=</span><span class="nx">vod_id</span><span class="p">}</span><span class="kd">let</span> <span class="nx">t2</span><span class="o">=</span><span class="p">(</span><span class="k">new</span> <span class="nb">Date</span><span class="p">)</span><span class="p">.</span><span class="nx">getTime</span><span class="p">(</span><span class="p">)</span><span class="p">;</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="sb">`</span><span class="sb">加载二级界面</span><span class="si">${</span><span class="nx">MY_URL</span><span class="si">}</span><span class="sb">耗时:</span><span class="si">${</span><span class="nx">t2</span><span class="o">-</span><span class="nx">t1</span><span class="si">}</span><span class="sb">毫秒</span><span class="sb">`</span><span class="p">)</span><span class="p">;</span><span class="k">return</span> <span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span><span class="p">{</span><span class="nx">list</span><span class="o">:</span><span class="p">[</span><span class="nx">vod</span><span class="p">]</span><span class="p">}</span><span class="p">)</span><span class="p">}</span><span class="kd">function</span> <span class="nx">tellIsJx</span><span class="p">(</span><span class="nx">url</span><span class="p">)</span><span class="p">{</span><span class="k">try</span><span class="p">{</span><span class="kd">let</span> <span class="nx">is_vip</span><span class="o">=</span><span class="o">!</span><span class="sr">/\.(m3u8|mp4|m4a)$/</span><span class="p">.</span><span class="nx">test</span><span class="p">(</span><span class="nx">url</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span><span class="s2">&#34;?&#34;</span><span class="p">)</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="p">)</span><span class="o">&amp;&amp;</span><span class="nx">是否正版</span><span class="p">(</span><span class="nx">url</span><span class="p">)</span><span class="p">;</span><span class="k">return</span> <span class="nx">is_vip</span><span class="o">?</span><span class="mi">1</span><span class="o">:</span><span class="mi">0</span><span class="p">}</span><span class="k">catch</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span><span class="p">{</span><span class="k">return</span> <span class="mi">1</span><span class="p">}</span><span class="p">}</span><span class="kd">function</span> <span class="nx">playParse</span><span class="p">(</span><span class="nx">playObj</span><span class="p">)</span><span class="p">{</span><span class="nx">fetch_params</span><span class="o">=</span><span class="nx">JSON</span><span class="p">.</span><span class="nx">parse</span><span class="p">(</span><span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span><span class="nx">rule_fetch_params</span><span class="p">)</span><span class="p">)</span><span class="p">;</span><span class="nx">MY_URL</span><span class="o">=</span><span class="nx">playObj</span><span class="p">.</span><span class="nx">url</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="sr">/http/</span><span class="p">.</span><span class="nx">test</span><span class="p">(</span><span class="nx">MY_URL</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="k">try</span><span class="p">{</span><span class="nx">MY_URL</span><span class="o">=</span><span class="nx">base64Decode</span><span class="p">(</span><span class="nx">MY_URL</span><span class="p">)</span><span class="p">}</span><span class="k">catch</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span><span class="p">{</span><span class="p">}</span><span class="p">}</span><span class="nx">MY_URL</span><span class="o">=</span><span class="nb">decodeURIComponent</span><span class="p">(</span><span class="nx">MY_URL</span><span class="p">)</span><span class="p">;</span><span class="kd">var</span> <span class="nx">input</span><span class="o">=</span><span class="nx">MY_URL</span><span class="p">;</span><span class="kd">let</span> <span class="nx">common_play</span><span class="o">=</span><span class="p">{</span><span class="nx">parse</span><span class="o">:</span><span class="mi">1</span><span class="p">,</span><span class="nx">url</span><span class="o">:</span><span class="nx">input</span><span class="p">,</span><span class="nx">jx</span><span class="o">:</span><span class="nx">tellIsJx</span><span class="p">(</span><span class="nx">input</span><span class="p">)</span><span class="p">}</span><span class="p">;</span><span class="kd">let</span> <span class="nx">lazy_play</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="nx">rule</span><span class="p">.</span><span class="nx">play_parse</span><span class="o">||</span><span class="o">!</span><span class="nx">rule</span><span class="p">.</span><span class="nx">lazy</span><span class="p">)</span><span class="p">{</span><span class="nx">lazy_play</span><span class="o">=</span><span class="nx">common_play</span><span class="p">}</span><span class="k">else</span> <span class="k">if</span><span class="p">(</span><span class="nx">rule</span><span class="p">.</span><span class="nx">play_parse</span><span class="o">&amp;&amp;</span><span class="nx">rule</span><span class="p">.</span><span class="nx">lazy</span><span class="o">&amp;&amp;</span><span class="k">typeof</span> <span class="nx">rule</span><span class="p">.</span><span class="nx">lazy</span><span class="o">===</span><span class="s2">&#34;string&#34;</span><span class="p">)</span><span class="p">{</span><span class="k">try</span><span class="p">{</span><span class="kd">let</span> <span class="nx">lazy_code</span><span class="o">=</span><span class="nx">rule</span><span class="p">.</span><span class="nx">lazy</span><span class="p">.</span><span class="nx">replace</span><span class="p">(</span><span class="s2">&#34;js:&#34;</span><span class="p">,</span><span class="s2">&#34;&#34;</span><span class="p">)</span><span class="p">.</span><span class="nx">trim</span><span class="p">(</span><span class="p">)</span><span class="p">;</span><span class="nx">print</span><span class="p">(</span><span class="s2">&#34;开始执行js免嗅=&gt;&#34;</span><span class="o">+</span><span class="nx">lazy_code</span><span class="p">)</span><span class="p">;</span><span class="nb">eval</span><span class="p">(</span><span class="nx">lazy_code</span><span class="p">)</span><span class="p">;</span><span class="nx">lazy_play</span><span class="o">=</span><span class="k">typeof</span> <span class="nx">input</span><span class="o">===</span><span class="s2">&#34;object&#34;</span><span class="o">?</span><span class="nx">input</span><span class="o">:</span><span class="p">{</span><span class="nx">parse</span><span class="o">:</span><span class="mi">1</span><span class="p">,</span><span class="nx">jx</span><span class="o">:</span><span class="nx">tellIsJx</span><span class="p">(</span><span class="nx">input</span><span class="p">)</span><span class="p">,</span><span class="nx">url</span><span class="o">:</span><span class="nx">input</span><span class="p">}</span><span class="p">}</span><span class="k">catch</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span><span class="p">{</span><span class="nx">print</span><span class="p">(</span><span class="s2">&#34;js免嗅错误:&#34;</span><span class="o">+</span><span class="nx">e</span><span class="p">.</span><span class="nx">message</span><span class="p">)</span><span class="p">;</span><span class="nx">lazy_play</span><span class="o">=</span><span class="nx">common_play</span><span class="p">}</span><span class="p">}</span><span class="k">else</span><span class="p">{</span><span class="nx">lazy_play</span><span class="o">=</span><span class="nx">common_play</span><span class="p">}</span><span class="k">if</span><span class="p">(</span><span class="nb">Array</span><span class="p">.</span><span class="nx">isArray</span><span class="p">(</span><span class="nx">rule</span><span class="p">.</span><span class="nx">play_json</span><span class="p">)</span><span class="o">&amp;&amp;</span><span class="nx">rule</span><span class="p">.</span><span class="nx">play_json</span><span class="p">.</span><span class="nx">length</span><span class="o">&gt;</span><span class="mi">0</span><span class="p">)</span><span class="p">{</span><span class="kd">let</span> <span class="nx">web_url</span><span class="o">=</span><span class="nx">lazy_play</span><span class="p">.</span><span class="nx">url</span><span class="p">;</span><span class="k">for</span><span class="p">(</span><span class="kd">let</span> <span class="nx">pjson</span> <span class="k">of</span> <span class="nx">rule</span><span class="p">.</span><span class="nx">play_json</span><span class="p">)</span><span class="p">{</span><span class="k">if</span><span class="p">(</span><span class="nx">pjson</span><span class="p">.</span><span class="nx">re</span><span class="o">&amp;&amp;</span><span class="p">(</span><span class="nx">pjson</span><span class="p">.</span><span class="nx">re</span><span class="o">===</span><span class="s2">&#34;*&#34;</span><span class="o">||</span><span class="nx">web_url</span><span class="p">.</span><span class="nx">match</span><span class="p">(</span><span class="k">new</span> <span class="nb">RegExp</span><span class="p">(</span><span class="nx">pjson</span><span class="p">.</span><span class="nx">re</span><span class="p">)</span><span class="p">)</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="k">if</span><span class="p">(</span><span class="nx">pjson</span><span class="p">.</span><span class="nx">json</span><span class="o">&amp;&amp;</span><span class="k">typeof</span> <span class="nx">pjson</span><span class="p">.</span><span class="nx">json</span><span class="o">===</span><span class="s2">&#34;object&#34;</span><span class="p">)</span><span class="p">{</span><span class="kd">let</span> <span class="nx">base_json</span><span class="o">=</span><span class="nx">pjson</span><span class="p">.</span><span class="nx">json</span><span class="p">;</span><span class="nx">lazy_play</span><span class="o">=</span><span class="nb">Object</span><span class="p">.</span><span class="nx">assign</span><span class="p">(</span><span class="nx">lazy_play</span><span class="p">,</span><span class="nx">base_json</span><span class="p">)</span><span class="p">;</span><span class="k">break</span><span class="p">}</span><span class="p">}</span><span class="p">}</span><span class="p">}</span><span class="k">else</span> <span class="k">if</span><span class="p">(</span><span class="nx">rule</span><span class="p">.</span><span class="nx">play_json</span><span class="o">&amp;&amp;</span><span class="o">!</span><span class="nb">Array</span><span class="p">.</span><span class="nx">isArray</span><span class="p">(</span><span class="nx">rule</span><span class="p">.</span><span class="nx">play_json</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="kd">let</span> <span class="nx">base_json</span><span class="o">=</span><span class="p">{</span><span class="nx">jx</span><span class="o">:</span><span class="mi">1</span><span class="p">,</span><span class="nx">parse</span><span class="o">:</span><span class="mi">1</span><span class="p">}</span><span class="p">;</span><span class="nx">lazy_play</span><span class="o">=</span><span class="nb">Object</span><span class="p">.</span><span class="nx">assign</span><span class="p">(</span><span class="nx">lazy_play</span><span class="p">,</span><span class="nx">base_json</span><span class="p">)</span><span class="p">}</span><span class="k">else</span> <span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="nx">rule</span><span class="p">.</span><span class="nx">play_json</span><span class="p">)</span><span class="p">{</span><span class="kd">let</span> <span class="nx">base_json</span><span class="o">=</span><span class="p">{</span><span class="nx">jx</span><span class="o">:</span><span class="mi">0</span><span class="p">,</span><span class="nx">parse</span><span class="o">:</span><span class="mi">1</span><span class="p">}</span><span class="p">;</span><span class="nx">lazy_play</span><span class="o">=</span><span class="nb">Object</span><span class="p">.</span><span class="nx">assign</span><span class="p">(</span><span class="nx">lazy_play</span><span class="p">,</span><span class="nx">base_json</span><span class="p">)</span><span class="p">}</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span><span class="nx">lazy_play</span><span class="p">)</span><span class="p">)</span><span class="p">;</span><span class="k">return</span> <span class="nx">JSON</span><span class="p">.</span><span class="nx">stringify</span><span class="p">(</span><span class="nx">lazy_play</span><span class="p">)</span><span class="p">}</span><span class="kd">function</span> <span class="nx">init</span><span class="p">(</span><span class="nx">ext</span><span class="p">)</span><span class="p">{</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="s2">&#34;init&#34;</span><span class="p">)</span><span class="p">;</span><span class="k">try</span><span class="p">{</span><span class="kd">let</span> <span class="nx">muban</span><span class="o">=</span><span class="nx">模板</span><span class="p">.</span><span class="nx">getMubans</span><span class="p">(</span><span class="p">)</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="k">typeof</span> <span class="nx">ext</span><span class="o">==</span><span class="s2">&#34;object&#34;</span><span class="p">)</span><span class="p">{</span><span class="nx">rule</span><span class="o">=</span><span class="nx">ext</span><span class="p">}</span><span class="k">else</span> <span class="k">if</span><span class="p">(</span><span class="k">typeof</span> <span class="nx">ext</span><span class="o">==</span><span class="s2">&#34;string&#34;</span><span class="p">)</span><span class="p">{</span><span class="k">if</span><span class="p">(</span><span class="nx">ext</span><span class="p">.</span><span class="nx">startsWith</span><span class="p">(</span><span class="s2">&#34;http&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="kd">let</span> <span class="nx">js</span><span class="o">=</span><span class="nx">request</span><span class="p">(</span><span class="nx">ext</span><span class="p">,</span><span class="p">{</span><span class="nx">method</span><span class="o">:</span><span class="s2">&#34;GET&#34;</span><span class="p">}</span><span class="p">)</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">js</span><span class="p">)</span><span class="p">{</span><span class="nb">eval</span><span class="p">(</span><span class="nx">js</span><span class="p">.</span><span class="nx">replace</span><span class="p">(</span><span class="s2">&#34;var rule&#34;</span><span class="p">,</span><span class="s2">&#34;rule&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">}</span><span class="p">}</span><span class="k">else</span><span class="p">{</span><span class="nb">eval</span><span class="p">(</span><span class="nx">ext</span><span class="p">.</span><span class="nx">replace</span><span class="p">(</span><span class="s2">&#34;var rule&#34;</span><span class="p">,</span><span class="s2">&#34;rule&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">}</span><span class="p">}</span><span class="k">if</span><span class="p">(</span><span class="nx">rule</span><span class="p">.</span><span class="nx">模板</span><span class="o">&amp;&amp;</span><span class="nx">muban</span><span class="p">.</span><span class="nx">hasOwnProperty</span><span class="p">(</span><span class="nx">rule</span><span class="p">.</span><span class="nx">模板</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="nx">print</span><span class="p">(</span><span class="s2">&#34;继承模板:&#34;</span><span class="o">+</span><span class="nx">rule</span><span class="p">.</span><span class="nx">模板</span><span class="p">)</span><span class="p">;</span><span class="nx">rule</span><span class="o">=</span><span class="nb">Object</span><span class="p">.</span><span class="nx">assign</span><span class="p">(</span><span class="nx">muban</span><span class="p">[</span><span class="nx">rule</span><span class="p">.</span><span class="nx">模板</span><span class="p">]</span><span class="p">,</span><span class="nx">rule</span><span class="p">)</span><span class="p">}</span><span class="kd">let</span> <span class="nx">rule_cate_excludes</span><span class="o">=</span><span class="p">(</span><span class="nx">rule</span><span class="p">.</span><span class="nx">cate_exclude</span><span class="o">||</span><span class="s2">&#34;&#34;</span><span class="p">)</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span><span class="s2">&#34;|&#34;</span><span class="p">)</span><span class="p">.</span><span class="nx">filter</span><span class="p">(</span><span class="nx">it</span><span class="p">=&gt;</span><span class="nx">it</span><span class="p">.</span><span class="nx">trim</span><span class="p">(</span><span class="p">)</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">rule_tab_excludes</span><span class="o">=</span><span class="p">(</span><span class="nx">rule</span><span class="p">.</span><span class="nx">tab_exclude</span><span class="o">||</span><span class="s2">&#34;&#34;</span><span class="p">)</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span><span class="s2">&#34;|&#34;</span><span class="p">)</span><span class="p">.</span><span class="nx">filter</span><span class="p">(</span><span class="nx">it</span><span class="p">=&gt;</span><span class="nx">it</span><span class="p">.</span><span class="nx">trim</span><span class="p">(</span><span class="p">)</span><span class="p">)</span><span class="p">;</span><span class="nx">rule_cate_excludes</span><span class="o">=</span><span class="nx">rule_cate_excludes</span><span class="p">.</span><span class="nx">concat</span><span class="p">(</span><span class="nx">CATE_EXCLUDE</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span><span class="s2">&#34;|&#34;</span><span class="p">)</span><span class="p">.</span><span class="nx">filter</span><span class="p">(</span><span class="nx">it</span><span class="p">=&gt;</span><span class="nx">it</span><span class="p">.</span><span class="nx">trim</span><span class="p">(</span><span class="p">)</span><span class="p">)</span><span class="p">)</span><span class="p">;</span><span class="nx">rule_tab_excludes</span><span class="o">=</span><span class="nx">rule_tab_excludes</span><span class="p">.</span><span class="nx">concat</span><span class="p">(</span><span class="nx">TAB_EXCLUDE</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span><span class="s2">&#34;|&#34;</span><span class="p">)</span><span class="p">.</span><span class="nx">filter</span><span class="p">(</span><span class="nx">it</span><span class="p">=&gt;</span><span class="nx">it</span><span class="p">.</span><span class="nx">trim</span><span class="p">(</span><span class="p">)</span><span class="p">)</span><span class="p">)</span><span class="p">;</span><span class="nx">rule</span><span class="p">.</span><span class="nx">cate_exclude</span><span class="o">=</span><span class="nx">rule_cate_excludes</span><span class="p">.</span><span class="nx">join</span><span class="p">(</span><span class="s2">&#34;|&#34;</span><span class="p">)</span><span class="p">;</span><span class="nx">rule</span><span class="p">.</span><span class="nx">tab_exclude</span><span class="o">=</span><span class="nx">rule_tab_excludes</span><span class="p">.</span><span class="nx">join</span><span class="p">(</span><span class="s2">&#34;|&#34;</span><span class="p">)</span><span class="p">;</span><span class="nx">rule</span><span class="p">.</span><span class="nx">host</span><span class="o">=</span><span class="p">(</span><span class="nx">rule</span><span class="p">.</span><span class="nx">host</span><span class="o">||</span><span class="s2">&#34;&#34;</span><span class="p">)</span><span class="p">.</span><span class="nx">rstrip</span><span class="p">(</span><span class="s2">&#34;/&#34;</span><span class="p">)</span><span class="p">;</span><span class="nx">HOST</span><span class="o">=</span><span class="nx">rule</span><span class="p">.</span><span class="nx">host</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">rule</span><span class="p">.</span><span class="nx">hostJs</span><span class="p">)</span><span class="p">{</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="sb">`</span><span class="sb">检测到hostJs,准备执行...</span><span class="sb">`</span><span class="p">)</span><span class="p">;</span><span class="k">try</span><span class="p">{</span><span class="nb">eval</span><span class="p">(</span><span class="nx">rule</span><span class="p">.</span><span class="nx">hostJs</span><span class="p">)</span><span class="p">;</span><span class="nx">rule</span><span class="p">.</span><span class="nx">host</span><span class="o">=</span><span class="nx">HOST</span><span class="p">.</span><span class="nx">rstrip</span><span class="p">(</span><span class="s2">&#34;/&#34;</span><span class="p">)</span><span class="p">}</span><span class="k">catch</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span><span class="p">{</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="sb">`</span><span class="sb">执行</span><span class="si">${</span><span class="nx">rule</span><span class="p">.</span><span class="nx">hostJs</span><span class="si">}</span><span class="sb">获取host发生错误:</span><span class="sb">`</span><span class="o">+</span><span class="nx">e</span><span class="p">.</span><span class="nx">message</span><span class="p">)</span><span class="p">}</span><span class="p">}</span><span class="nx">rule</span><span class="p">.</span><span class="nx">url</span><span class="o">=</span><span class="nx">rule</span><span class="p">.</span><span class="nx">url</span><span class="o">||</span><span class="s2">&#34;&#34;</span><span class="p">;</span><span class="nx">rule</span><span class="p">.</span><span class="kr">double</span><span class="o">=</span><span class="nx">rule</span><span class="p">.</span><span class="kr">double</span><span class="o">||</span><span class="kc">false</span><span class="p">;</span><span class="nx">rule</span><span class="p">.</span><span class="nx">homeUrl</span><span class="o">=</span><span class="nx">rule</span><span class="p">.</span><span class="nx">homeUrl</span><span class="o">||</span><span class="s2">&#34;&#34;</span><span class="p">;</span><span class="nx">rule</span><span class="p">.</span><span class="nx">detailUrl</span><span class="o">=</span><span class="nx">rule</span><span class="p">.</span><span class="nx">detailUrl</span><span class="o">||</span><span class="s2">&#34;&#34;</span><span class="p">;</span><span class="nx">rule</span><span class="p">.</span><span class="nx">searchUrl</span><span class="o">=</span><span class="nx">rule</span><span class="p">.</span><span class="nx">searchUrl</span><span class="o">||</span><span class="s2">&#34;&#34;</span><span class="p">;</span><span class="nx">rule</span><span class="p">.</span><span class="nx">homeUrl</span><span class="o">=</span><span class="nx">rule</span><span class="p">.</span><span class="nx">host</span><span class="o">&amp;&amp;</span><span class="nx">rule</span><span class="p">.</span><span class="nx">homeUrl</span><span class="o">?</span><span class="nx">urljoin</span><span class="p">(</span><span class="nx">rule</span><span class="p">.</span><span class="nx">host</span><span class="p">,</span><span class="nx">rule</span><span class="p">.</span><span class="nx">homeUrl</span><span class="p">)</span><span class="o">:</span><span class="nx">rule</span><span class="p">.</span><span class="nx">homeUrl</span><span class="o">||</span><span class="nx">rule</span><span class="p">.</span><span class="nx">host</span><span class="p">;</span><span class="nx">rule</span><span class="p">.</span><span class="nx">detailUrl</span><span class="o">=</span><span class="nx">rule</span><span class="p">.</span><span class="nx">host</span><span class="o">&amp;&amp;</span><span class="nx">rule</span><span class="p">.</span><span class="nx">detailUrl</span><span class="o">?</span><span class="nx">urljoin</span><span class="p">(</span><span class="nx">rule</span><span class="p">.</span><span class="nx">host</span><span class="p">,</span><span class="nx">rule</span><span class="p">.</span><span class="nx">detailUrl</span><span class="p">)</span><span class="o">:</span><span class="nx">rule</span><span class="p">.</span><span class="nx">detailUrl</span><span class="p">;</span><span class="nx">rule</span><span class="p">.</span><span class="nx">二级访问前</span><span class="o">=</span><span class="nx">rule</span><span class="p">.</span><span class="nx">二级访问前</span><span class="o">||</span><span class="s2">&#34;&#34;</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">rule</span><span class="p">.</span><span class="nx">url</span><span class="p">.</span><span class="nx">includes</span><span class="p">(</span><span class="s2">&#34;[&#34;</span><span class="p">)</span><span class="o">&amp;&amp;</span><span class="nx">rule</span><span class="p">.</span><span class="nx">url</span><span class="p">.</span><span class="nx">includes</span><span class="p">(</span><span class="s2">&#34;]&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="kd">let</span> <span class="nx">u1</span><span class="o">=</span><span class="nx">rule</span><span class="p">.</span><span class="nx">url</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span><span class="s2">&#34;[&#34;</span><span class="p">)</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="p">;</span><span class="kd">let</span> <span class="nx">u2</span><span class="o">=</span><span class="nx">rule</span><span class="p">.</span><span class="nx">url</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span><span class="s2">&#34;[&#34;</span><span class="p">)</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span><span class="s2">&#34;]&#34;</span><span class="p">)</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="p">;</span><span class="nx">rule</span><span class="p">.</span><span class="nx">url</span><span class="o">=</span><span class="nx">rule</span><span class="p">.</span><span class="nx">host</span><span class="o">&amp;&amp;</span><span class="nx">rule</span><span class="p">.</span><span class="nx">url</span><span class="o">?</span><span class="nx">urljoin</span><span class="p">(</span><span class="nx">rule</span><span class="p">.</span><span class="nx">host</span><span class="p">,</span><span class="nx">u1</span><span class="p">)</span><span class="o">+</span><span class="s2">&#34;[&#34;</span><span class="o">+</span><span class="nx">urljoin</span><span class="p">(</span><span class="nx">rule</span><span class="p">.</span><span class="nx">host</span><span class="p">,</span><span class="nx">u2</span><span class="p">)</span><span class="o">+</span><span class="s2">&#34;]&#34;</span><span class="o">:</span><span class="nx">rule</span><span class="p">.</span><span class="nx">url</span><span class="p">}</span><span class="k">else</span><span class="p">{</span><span class="nx">rule</span><span class="p">.</span><span class="nx">url</span><span class="o">=</span><span class="nx">rule</span><span class="p">.</span><span class="nx">host</span><span class="o">&amp;&amp;</span><span class="nx">rule</span><span class="p">.</span><span class="nx">url</span><span class="o">?</span><span class="nx">urljoin</span><span class="p">(</span><span class="nx">rule</span><span class="p">.</span><span class="nx">host</span><span class="p">,</span><span class="nx">rule</span><span class="p">.</span><span class="nx">url</span><span class="p">)</span><span class="o">:</span><span class="nx">rule</span><span class="p">.</span><span class="nx">url</span><span class="p">}</span><span class="nx">rule</span><span class="p">.</span><span class="nx">searchUrl</span><span class="o">=</span><span class="nx">rule</span><span class="p">.</span><span class="nx">host</span><span class="o">&amp;&amp;</span><span class="nx">rule</span><span class="p">.</span><span class="nx">searchUrl</span><span class="o">?</span><span class="nx">urljoin</span><span class="p">(</span><span class="nx">rule</span><span class="p">.</span><span class="nx">host</span><span class="p">,</span><span class="nx">rule</span><span class="p">.</span><span class="nx">searchUrl</span><span class="p">)</span><span class="o">:</span><span class="nx">rule</span><span class="p">.</span><span class="nx">searchUrl</span><span class="p">;</span><span class="nx">rule</span><span class="p">.</span><span class="nx">timeout</span><span class="o">=</span><span class="nx">rule</span><span class="p">.</span><span class="nx">timeout</span><span class="o">||</span><span class="mi">5</span><span class="nx">e3</span><span class="p">;</span><span class="nx">rule</span><span class="p">.</span><span class="nx">encoding</span><span class="o">=</span><span class="nx">rule</span><span class="p">.</span><span class="nx">编码</span><span class="o">||</span><span class="nx">rule</span><span class="p">.</span><span class="nx">encoding</span><span class="o">||</span><span class="s2">&#34;utf-8&#34;</span><span class="p">;</span><span class="nx">rule</span><span class="p">.</span><span class="nx">search_encoding</span><span class="o">=</span><span class="nx">rule</span><span class="p">.</span><span class="nx">搜索编码</span><span class="o">||</span><span class="nx">rule</span><span class="p">.</span><span class="nx">search_encoding</span><span class="o">||</span><span class="s2">&#34;&#34;</span><span class="p">;</span><span class="nx">rule</span><span class="p">.</span><span class="nx">图片来源</span><span class="o">=</span><span class="nx">rule</span><span class="p">.</span><span class="nx">图片来源</span><span class="o">||</span><span class="s2">&#34;&#34;</span><span class="p">;</span><span class="nx">rule</span><span class="p">.</span><span class="nx">play_json</span><span class="o">=</span><span class="nx">rule</span><span class="p">.</span><span class="nx">hasOwnProperty</span><span class="p">(</span><span class="s2">&#34;play_json&#34;</span><span class="p">)</span><span class="o">?</span><span class="nx">rule</span><span class="p">.</span><span class="nx">play_json</span><span class="o">:</span><span class="p">[</span><span class="p">]</span><span class="p">;</span><span class="nx">rule</span><span class="p">.</span><span class="nx">pagecount</span><span class="o">=</span><span class="nx">rule</span><span class="p">.</span><span class="nx">hasOwnProperty</span><span class="p">(</span><span class="s2">&#34;pagecount&#34;</span><span class="p">)</span><span class="o">?</span><span class="nx">rule</span><span class="p">.</span><span class="nx">pagecount</span><span class="o">:</span><span class="p">{</span><span class="p">}</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">rule</span><span class="p">.</span><span class="nx">headers</span><span class="o">&amp;&amp;</span><span class="k">typeof</span> <span class="nx">rule</span><span class="p">.</span><span class="nx">headers</span><span class="o">===</span><span class="s2">&#34;object&#34;</span><span class="p">)</span><span class="p">{</span><span class="k">try</span><span class="p">{</span><span class="kd">let</span> <span class="nx">header_keys</span><span class="o">=</span><span class="nb">Object</span><span class="p">.</span><span class="nx">keys</span><span class="p">(</span><span class="nx">rule</span><span class="p">.</span><span class="nx">headers</span><span class="p">)</span><span class="p">;</span><span class="k">for</span><span class="p">(</span><span class="kd">let</span> <span class="nx">k</span> <span class="k">of</span> <span class="nx">header_keys</span><span class="p">)</span><span class="p">{</span><span class="k">if</span><span class="p">(</span><span class="nx">k</span><span class="p">.</span><span class="nx">toLowerCase</span><span class="p">(</span><span class="p">)</span><span class="o">===</span><span class="s2">&#34;user-agent&#34;</span><span class="p">)</span><span class="p">{</span><span class="kd">let</span> <span class="nx">v</span><span class="o">=</span><span class="nx">rule</span><span class="p">.</span><span class="nx">headers</span><span class="p">[</span><span class="nx">k</span><span class="p">]</span><span class="p">;</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">v</span><span class="p">)</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="p">[</span><span class="s2">&#34;MOBILE_UA&#34;</span><span class="p">,</span><span class="s2">&#34;PC_UA&#34;</span><span class="p">,</span><span class="s2">&#34;UC_UA&#34;</span><span class="p">,</span><span class="s2">&#34;IOS_UA&#34;</span><span class="p">,</span><span class="s2">&#34;UA&#34;</span><span class="p">]</span><span class="p">.</span><span class="nx">includes</span><span class="p">(</span><span class="nx">v</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="nx">rule</span><span class="p">.</span><span class="nx">headers</span><span class="p">[</span><span class="nx">k</span><span class="p">]</span><span class="o">=</span><span class="nb">eval</span><span class="p">(</span><span class="nx">v</span><span class="p">)</span><span class="p">}</span><span class="p">}</span><span class="k">else</span> <span class="k">if</span><span class="p">(</span><span class="nx">k</span><span class="p">.</span><span class="nx">toLowerCase</span><span class="p">(</span><span class="p">)</span><span class="o">===</span><span class="s2">&#34;cookie&#34;</span><span class="p">)</span><span class="p">{</span><span class="kd">let</span> <span class="nx">v</span><span class="o">=</span><span class="nx">rule</span><span class="p">.</span><span class="nx">headers</span><span class="p">[</span><span class="nx">k</span><span class="p">]</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">v</span><span class="o">&amp;&amp;</span><span class="nx">v</span><span class="p">.</span><span class="nx">startsWith</span><span class="p">(</span><span class="s2">&#34;http&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">v</span><span class="p">)</span><span class="p">;</span><span class="k">try</span><span class="p">{</span><span class="nx">v</span><span class="o">=</span><span class="nx">fetch</span><span class="p">(</span><span class="nx">v</span><span class="p">)</span><span class="p">;</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">v</span><span class="p">)</span><span class="p">;</span><span class="nx">rule</span><span class="p">.</span><span class="nx">headers</span><span class="p">[</span><span class="nx">k</span><span class="p">]</span><span class="o">=</span><span class="nx">v</span><span class="p">}</span><span class="k">catch</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span><span class="p">{</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="sb">`</span><span class="sb">从</span><span class="si">${</span><span class="nx">v</span><span class="si">}</span><span class="sb">获取cookie发生错误:</span><span class="sb">`</span><span class="o">+</span><span class="nx">e</span><span class="p">.</span><span class="nx">message</span><span class="p">)</span><span class="p">}</span><span class="p">}</span><span class="p">}</span><span class="p">}</span><span class="p">}</span><span class="k">catch</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span><span class="p">{</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="s2">&#34;处理headers发生错误:&#34;</span><span class="o">+</span><span class="nx">e</span><span class="p">.</span><span class="nx">message</span><span class="p">)</span><span class="p">}</span><span class="p">}</span><span class="nx">rule_fetch_params</span><span class="o">=</span><span class="p">{</span><span class="nx">headers</span><span class="o">:</span><span class="nx">rule</span><span class="p">.</span><span class="nx">headers</span><span class="o">||</span><span class="kc">false</span><span class="p">,</span><span class="nx">timeout</span><span class="o">:</span><span class="nx">rule</span><span class="p">.</span><span class="nx">timeout</span><span class="p">,</span><span class="nx">encoding</span><span class="o">:</span><span class="nx">rule</span><span class="p">.</span><span class="nx">encoding</span><span class="p">}</span><span class="p">;</span><span class="nx">oheaders</span><span class="o">=</span><span class="nx">rule</span><span class="p">.</span><span class="nx">headers</span><span class="o">||</span><span class="p">{</span><span class="p">}</span><span class="p">;</span><span class="nx">RKEY</span><span class="o">=</span><span class="k">typeof</span> <span class="nx">key</span><span class="o">!==</span><span class="s2">&#34;undefined&#34;</span><span class="o">&amp;&amp;</span><span class="nx">key</span><span class="o">?</span><span class="nx">key</span><span class="o">:</span><span class="s2">&#34;drpy_&#34;</span><span class="o">+</span><span class="p">(</span><span class="nx">rule</span><span class="p">.</span><span class="nx">title</span><span class="o">||</span><span class="nx">rule</span><span class="p">.</span><span class="nx">host</span><span class="p">)</span><span class="p">;</span><span class="nx">pre</span><span class="p">(</span><span class="p">)</span><span class="p">;</span><span class="nx">init_test</span><span class="p">(</span><span class="p">)</span><span class="p">}</span><span class="k">catch</span><span class="p">(</span><span class="nx">e</span><span class="p">)</span><span class="p">{</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="s2">&#34;init_test发生错误:&#34;</span><span class="o">+</span><span class="nx">e</span><span class="p">.</span><span class="nx">message</span><span class="p">)</span><span class="p">}</span><span class="p">}</span><span class="kd">let</span> <span class="nx">homeHtmlCache</span><span class="o">=</span><span class="kc">undefined</span><span class="p">;</span><span class="kd">function</span> <span class="nx">home</span><span class="p">(</span><span class="nx">filter</span><span class="p">)</span><span class="p">{</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="s2">&#34;home&#34;</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">homeObj</span><span class="o">=</span><span class="p">{</span><span class="nx">filter</span><span class="o">:</span><span class="nx">rule</span><span class="p">.</span><span class="nx">filter</span><span class="o">||</span><span class="kc">false</span><span class="p">,</span><span class="nx">MY_URL</span><span class="o">:</span><span class="nx">rule</span><span class="p">.</span><span class="nx">homeUrl</span><span class="p">,</span><span class="nx">class_name</span><span class="o">:</span><span class="nx">rule</span><span class="p">.</span><span class="nx">class_name</span><span class="o">||</span><span class="s2">&#34;&#34;</span><span class="p">,</span><span class="nx">class_url</span><span class="o">:</span><span class="nx">rule</span><span class="p">.</span><span class="nx">class_url</span><span class="o">||</span><span class="s2">&#34;&#34;</span><span class="p">,</span><span class="nx">class_parse</span><span class="o">:</span><span class="nx">rule</span><span class="p">.</span><span class="nx">class_parse</span><span class="o">||</span><span class="s2">&#34;&#34;</span><span class="p">,</span><span class="nx">cate_exclude</span><span class="o">:</span><span class="nx">rule</span><span class="p">.</span><span class="nx">cate_exclude</span><span class="p">}</span><span class="p">;</span><span class="k">return</span> <span class="nx">homeParse</span><span class="p">(</span><span class="nx">homeObj</span><span class="p">)</span><span class="p">}</span><span class="kd">function</span> <span class="nx">homeVod</span><span class="p">(</span><span class="nx">params</span><span class="p">)</span><span class="p">{</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="s2">&#34;homeVod&#34;</span><span class="p">)</span><span class="p">;</span><span class="kd">let</span> <span class="nx">homeVodObj</span><span class="o">=</span><span class="p">{</span><span class="s2">&#34;推荐&#34;</span><span class="o">:</span><span class="nx">rule</span><span class="p">.</span><span class="nx">推荐</span><span class="p">,</span><span class="kr">double</span><span class="o">:</span><span class="nx">rule</span><span class="p">.</span><span class="kr">double</span><span class="p">,</span><span class="nx">homeUrl</span><span class="o">:</span><span class="nx">rule</span><span class="p">.</span><span class="nx">homeUrl</span><span class="p">,</span><span class="nx">detailUrl</span><span class="o">:</span><span class="nx">rule</span><span class="p">.</span><span class="nx">detailUrl</span><span class="p">}</span><span class="p">;</span><span class="k">return</span> <span class="nx">homeVodParse</span><span class="p">(</span><span class="nx">homeVodObj</span><span class="p">)</span><span class="p">}</span><span class="kd">function</span> <span class="nx">category</span><span class="p">(</span><span class="nx">tid</span><span class="p">,</span><span class="nx">pg</span><span class="p">,</span><span class="nx">filter</span><span class="p">,</span><span class="nx">extend</span><span class="p">)</span><span class="p">{</span><span class="kd">let</span> <span class="nx">cateObj</span><span class="o">=</span><span class="p">{</span><span class="nx">url</span><span class="o">:</span><span class="nx">rule</span><span class="p">.</span><span class="nx">url</span><span class="p">,</span><span class="s2">&#34;一级&#34;</span><span class="o">:</span><span class="nx">rule</span><span class="p">.</span><span class="nx">一级</span><span class="p">,</span><span class="nx">tid</span><span class="o">:</span><span class="nx">tid</span><span class="p">,</span><span class="nx">pg</span><span class="o">:</span><span class="nb">parseInt</span><span class="p">(</span><span class="nx">pg</span><span class="p">)</span><span class="p">,</span><span class="nx">filter</span><span class="o">:</span><span class="nx">filter</span><span class="p">,</span><span class="nx">extend</span><span class="o">:</span><span class="nx">extend</span><span class="p">}</span><span class="p">;</span><span class="k">return</span> <span class="nx">categoryParse</span><span class="p">(</span><span class="nx">cateObj</span><span class="p">)</span><span class="p">}</span><span class="kd">function</span> <span class="nx">detail</span><span class="p">(</span><span class="nx">vod_url</span><span class="p">)</span><span class="p">{</span><span class="kd">let</span> <span class="nx">orId</span><span class="o">=</span><span class="nx">vod_url</span><span class="p">;</span><span class="kd">let</span> <span class="nx">fyclass</span><span class="o">=</span><span class="s2">&#34;&#34;</span><span class="p">;</span><span class="nx">log</span><span class="p">(</span><span class="s2">&#34;orId:&#34;</span><span class="o">+</span><span class="nx">orId</span><span class="p">)</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="nx">vod_url</span><span class="p">.</span><span class="nx">indexOf</span><span class="p">(</span><span class="s2">&#34;$&#34;</span><span class="p">)</span><span class="o">&gt;</span><span class="o">-</span><span class="mi">1</span><span class="p">)</span><span class="p">{</span><span class="kd">let</span> <span class="nx">tmp</span><span class="o">=</span><span class="nx">vod_url</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span><span class="s2">&#34;$&#34;</span><span class="p">)</span><span class="p">;</span><span class="nx">fyclass</span><span class="o">=</span><span class="nx">tmp</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="p">;</span><span class="nx">vod_url</span><span class="o">=</span><span class="nx">tmp</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="p">}</span><span class="kd">let</span> <span class="nx">detailUrl</span><span class="o">=</span><span class="nx">vod_url</span><span class="p">.</span><span class="nx">split</span><span class="p">(</span><span class="s2">&#34;@@&#34;</span><span class="p">)</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="p">;</span><span class="kd">let</span> <span class="nx">url</span><span class="p">;</span><span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="nx">detailUrl</span><span class="p">.</span><span class="nx">startsWith</span><span class="p">(</span><span class="s2">&#34;http&#34;</span><span class="p">)</span><span class="o">&amp;&amp;</span><span class="o">!</span><span class="nx">detailUrl</span><span class="p">.</span><span class="nx">includes</span><span class="p">(</span><span class="s2">&#34;/&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="nx">url</span><span class="o">=</span><span class="nx">rule</span><span class="p">.</span><span class="nx">detailUrl</span><span class="p">.</span><span class="nx">replaceAll</span><span class="p">(</span><span class="s2">&#34;fyid&#34;</span><span class="p">,</span><span class="nx">detailUrl</span><span class="p">)</span><span class="p">.</span><span class="nx">replaceAll</span><span class="p">(</span><span class="s2">&#34;fyclass&#34;</span><span class="p">,</span><span class="nx">fyclass</span><span class="p">)</span><span class="p">}</span><span class="k">else</span> <span class="k">if</span><span class="p">(</span><span class="nx">detailUrl</span><span class="p">.</span><span class="nx">includes</span><span class="p">(</span><span class="s2">&#34;/&#34;</span><span class="p">)</span><span class="p">)</span><span class="p">{</span><span class="nx">url</span><span class="o">=</span><span class="nx">urljoin</span><span class="p">(</span><span class="nx">rule</span><span class="p">.</span><span class="nx">homeUrl</span><span class="p">,</span><span class="nx">detailUrl</span><span class="p">)</span><span class="p">}</span><span class="k">else</span><span class="p">{</span><span class="nx">url</span><span class="o">=</span><span class="nx">detailUrl</span><span class="p">}</span><span class="kd">let</span> <span class="nx">detailObj</span><span class="o">=</span><span class="p">{</span><span class="nx">orId</span><span class="o">:</span><span class="nx">orId</span><span class="p">,</span><span class="nx">url</span><span class="o">:</span><span class="nx">url</span><span class="p">,</span><span class="s2">&#34;二级&#34;</span><span class="o">:</span><span class="nx">rule</span><span class="p">.</span><span class="nx">二级</span><span class="p">,</span><span class="s2">&#34;二级访问前&#34;</span><span class="o">:</span><span class="nx">rule</span><span class="p">.</span><span class="nx">二级访问前</span><span class="p">,</span><span class="nx">detailUrl</span><span class="o">:</span><span class="nx">detailUrl</span><span class="p">,</span><span class="nx">fyclass</span><span class="o">:</span><span class="nx">fyclass</span><span class="p">,</span><span class="nx">tab_exclude</span><span class="o">:</span><span class="nx">rule</span><span class="p">.</span><span class="nx">tab_exclude</span><span class="p">}</span><span class="p">;</span><span class="k">return</span> <span class="nx">detailParse</span><span class="p">(</span><span class="nx">detailObj</span><span class="p">)</span><span class="p">}</span><span class="kd">function</span> <span class="nx">play</span><span class="p">(</span><span class="nx">flag</span><span class="p">,</span><span class="nx">id</span><span class="p">,</span><span class="nx">flags</span><span class="p">)</span><span class="p">{</span><span class="kd">let</span> <span class="nx">playObj</span><span class="o">=</span><span class="p">{</span><span class="nx">url</span><span class="o">:</span><span class="nx">id</span><span class="p">,</span><span class="nx">flag</span><span class="o">:</span><span class="nx">flag</span><span class="p">,</span><span class="nx">flags</span><span class="o">:</span><span class="nx">flags</span><span class="p">}</span><span class="p">;</span><span class="k">return</span> <span class="nx">playParse</span><span class="p">(</span><span class="nx">playObj</span><span class="p">)</span><span class="p">}</span><span class="kd">function</span> <span class="nx">search</span><span class="p">(</span><span class="nx">wd</span><span class="p">,</span><span class="nx">quick</span><span class="p">)</span><span class="p">{</span><span class="k">if</span><span class="p">(</span><span class="nx">rule</span><span class="p">.</span><span class="nx">search_encoding</span><span class="p">)</span><span class="p">{</span><span class="k">if</span><span class="p">(</span><span class="nx">rule</span><span class="p">.</span><span class="nx">search_encoding</span><span class="p">.</span><span class="nx">toLowerCase</span><span class="p">(</span><span class="p">)</span><span class="o">!==</span><span class="s2">&#34;utf-8&#34;</span><span class="p">)</span><span class="p">{</span><span class="nx">wd</span><span class="o">=</span><span class="nx">encodeStr</span><span class="p">(</span><span class="nx">wd</span><span class="p">,</span><span class="nx">rule</span><span class="p">.</span><span class="nx">search_encoding</span><span class="p">)</span><span class="p">}</span><span class="p">}</span><span class="k">else</span> <span class="k">if</span><span class="p">(</span><span class="nx">rule</span><span class="p">.</span><span class="nx">encoding</span><span class="o">&amp;&amp;</span><span class="nx">rule</span><span class="p">.</span><span class="nx">encoding</span><span class="p">.</span><span class="nx">toLowerCase</span><span class="p">(</span><span class="p">)</span><span class="o">!==</span><span class="s2">&#34;utf-8&#34;</span><span class="p">)</span><span class="p">{</span><span class="nx">wd</span><span class="o">=</span><span class="nx">encodeStr</span><span class="p">(</span><span class="nx">wd</span><span class="p">,</span><span class="nx">rule</span><span class="p">.</span><span class="nx">encoding</span><span class="p">)</span><span class="p">}</span><span class="kd">let</span> <span class="nx">searchObj</span><span class="o">=</span><span class="p">{</span><span class="nx">searchUrl</span><span class="o">:</span><span class="nx">rule</span><span class="p">.</span><span class="nx">searchUrl</span><span class="p">,</span><span class="s2">&#34;搜索&#34;</span><span class="o">:</span><span class="nx">rule</span><span class="p">.</span><span class="nx">搜索</span><span class="p">,</span><span class="nx">wd</span><span class="o">:</span><span class="nx">wd</span><span class="p">,</span><span class="nx">pg</span><span class="o">:</span><span class="mi">1</span><span class="p">,</span><span class="nx">quick</span><span class="o">:</span><span class="nx">quick</span><span class="p">}</span><span class="p">;</span><span class="k">return</span> <span class="nx">searchParse</span><span class="p">(</span><span class="nx">searchObj</span><span class="p">)</span><span class="p">}</span><span class="kd">function</span> <span class="nx">DRPY</span><span class="p">(</span><span class="p">)</span><span class="p">{</span><span class="k">return</span><span class="p">{</span><span class="nx">init</span><span class="o">:</span><span class="nx">init</span><span class="p">,</span><span class="nx">home</span><span class="o">:</span><span class="nx">home</span><span class="p">,</span><span class="nx">homeVod</span><span class="o">:</span><span class="nx">homeVod</span><span class="p">,</span><span class="nx">category</span><span class="o">:</span><span class="nx">category</span><span class="p">,</span><span class="nx">detail</span><span class="o">:</span><span class="nx">detail</span><span class="p">,</span><span class="nx">play</span><span class="o">:</span><span class="nx">play</span><span class="p">,</span><span class="nx">search</span><span class="o">:</span><span class="nx">search</span><span class="p">}</span><span class="p">}</span><span class="kr">export</span> <span class="k">default</span><span class="p">{</span><span class="nx">init</span><span class="o">:</span><span class="nx">init</span><span class="p">,</span><span class="nx">home</span><span class="o">:</span><span class="nx">home</span><span class="p">,</span><span class="nx">homeVod</span><span class="o">:</span><span class="nx">homeVod</span><span class="p">,</span><span class="nx">category</span><span class="o">:</span><span class="nx">category</span><span class="p">,</span><span class="nx">detail</span><span class="o">:</span><span class="nx">detail</span><span class="p">,</span><span class="nx">play</span><span class="o">:</span><span class="nx">play</span><span class="p">,</span><span class="nx">search</span><span class="o">:</span><span class="nx">search</span><span class="p">,</span><span class="nx">DRPY</span><span class="o">:</span><span class="nx">DRPY</span><span class="p">}</span><span class="p">;</span>
  421. </code>
  422. </td>
  423. </tr>
  424. </tbody>
  425. </table>
  426. </div>
  427. </div>
  428. </div>
  429. <div class="i-text-center">
  430. <button id="createTraining" class="ui primary button mt-md">创建训练</button>
  431. </div>
  432. <script>
  433. function submitDeleteForm() {
  434. var message = prompt("delete_confirm_message\n\ndelete_commit_summary", "Delete ''");
  435. if (message != null) {
  436. $("#delete-message").val(message);
  437. $("#delete-file-form").submit()
  438. }
  439. }
  440. </script>
  441. </div>
  442. <div id="toListModel">
  443. <div class="ui modal" id="toShare">
  444. <i class="close icon black"></i>
  445. <div class="header">共享</div>
  446. <div class="content">
  447. <form autocomplete="off" class="ui form training ignore-dirty">
  448. <div class="fields">
  449. <p class="px-sm py-none mb-sm">共享页面将在匿名链接下呈现所选的代码和训练结果,不会显示项目的原始链接地址。但Agit系统不会自动处理代码和训练结果,因此如果需要为匿名盲审等场景提供匿名内容,还需要您自行保证代码内容和训练结果的匿名化。</p>
  450. </div>
  451. <div class="fields">
  452. <div class="two wide field required">
  453. <label>代码分支</label>
  454. </div>
  455. <div id="branchField" class="fourteen wide field">
  456. <div class="fitted item choose">
  457. <div class="ui floating filter dropdown custom">
  458. <div class="ui basic small compact button" style="min-width: 200px;" @click="menuVisible = !menuVisible">
  459. <span class="text">
  460. <i class="iconfont icon-branch-down"></i>
  461. <span v-text='isViewBranch?"分支":"目录树"'></span>:
  462. <strong v-text='isViewBranch?(selectedBranch?selectedBranch:"请选择"):(selectedTag?selectedTag:"请选择")'></strong>
  463. </span>
  464. <i class="dropdown icon" tabIndex="-1"></i>
  465. </div>
  466. <div tabindex="-1" id="scrolling" class="menu transition menu-share" :class="{visible: menuVisible}" v-show="menuVisible" @blur="menuVisible = false">
  467. <div class="ui icon search input" style="width: 200px;">
  468. <i class="filter icon"></i>
  469. <input name="search" v-model="searchTerm" @keydown="keydown($event)" placeholder="过滤分支或标签...">
  470. </div>
  471. <div class="header branch-tag-choice">
  472. <div class="ui grid">
  473. <div class="two column row">
  474. <a class="reference column" href="javascript:;" @click="handleBranchTab(true)">
  475. <span class="text" :class="{black: !isViewBranch}">
  476. <i class="iconfont icon-branch-down"></i>
  477. 分支列表
  478. </span>
  479. </a>
  480. <a class="reference column" href="javascript:;" @click="handleBranchTab(false)">
  481. <span class="text" :class="{black: isViewBranch}">
  482. <i class="reference tags icon"></i>
  483. 标签列表
  484. </span>
  485. </a>
  486. </div>
  487. </div>
  488. </div>
  489. <div v-show="isViewBranch" class="scrolling menu" ref="scrollContainer">
  490. <div v-for="(item, index) in branches" v-show="item.name.includes(searchTerm)" :key="item.name" class="item" @click="handleBranchOrTag(item)">
  491. <span v-text="item.name"></span>
  492. </div>
  493. </div>
  494. <div v-show="!isViewBranch" class="scrolling menu" ref="scrollContainer">
  495. <div v-for="(item, index) in tags" v-show="item.name.includes(searchTerm)" :key="item.name" class="item" @click="handleBranchOrTag(item)">
  496. <span v-text="item.name"></span>
  497. </div>
  498. </div>
  499. <div class="message" v-if="(isViewBranch && branches.length==0) || (!isViewBranch && tags.length==0)">未找到结果</div>
  500. </div>
  501. <div class="ui pointing red basic label" style="display:none;">
  502. 请选择分支或标签
  503. </div>
  504. </div>
  505. </div>
  506. </div>
  507. </div>
  508. <div class="fields" v-show="selectedBranch">
  509. <div class="two wide field">
  510. <label>提交</label>
  511. </div>
  512. <div id="commitWrap" class="fourteen wide field">
  513. <select class="ui search selection dropdown commit-wrap" name="commit">
  514. <option value=""></option>
  515. </select>
  516. </div>
  517. </div>
  518. <div class="fields">
  519. <label class="two wide field required">共享标题</label>
  520. <div class="fourteen wide field trainName-filed">
  521. <input v-model="shareName" type="text" name="shareName" class="form-trainName" :maxlength="16" placeholder="请输入标题内容,最多16个字符">
  522. </div>
  523. </div>
  524. <div class="ui grid uioption">
  525. <label class="required">链接有效期</label>
  526. </div>
  527. <div class="ui grid fields">
  528. <div class="thirteen wide column">
  529. <div class="ui four item stackable tabs menu ui-link-bg">
  530. <a v-for="(item, index) in shareTimeList" :key="index" :class="['item', activeIdx === item.shareTimeId ? 'active' : '']" data-tab="oneday" @click="handleMenuChange(item)">
  531. <span v-text="formatLinkTime(item.shareTimeName)"></span></a>
  532. </div>
  533. </div>
  534. <div class="right aligned three wide column action mt-3xs">
  535. <button class="ui primary button" @click="handleLink">
  536. 生成链接</button>
  537. </div>
  538. </div>
  539. </form>
  540. </div>
  541. </div>
  542. <div class="ui modal" id="toCopyShareLink">
  543. <i class="close icon black"></i>
  544. <div class="header">共享链接已生成</div>
  545. <div class="content ui form">
  546. <div class="fields">
  547. <div class="two wide field">
  548. <label>链接地址:</label>
  549. </div>
  550. <div class="fourteen wide field">
  551. <p v-text="linkAddress" id="share_url"></p>
  552. </div>
  553. </div>
  554. <div class="fields uioption">
  555. <div class="two wide field">
  556. <label>链接有效期:</label>
  557. </div>
  558. <div class="fourteen wide field">
  559. <p v-text="linkExDate"></p>
  560. </div>
  561. </div>
  562. <div class="fields uioption">
  563. <div class="sixteen wide field" style="text-align: right">
  564. <button class="ui basic icon button poping primary up clipboard share-button" id="share-button" data-original="复制链接" data-success="已复制链接" data-error="请按下 ⌘-C 或 Ctrl-C 复制" data-content="复制链接" data-variation="inverted tiny" data-clipboard-target="#share_url">
  565. 复制
  566. </button>
  567. </div>
  568. </div>
  569. </div>
  570. </div>
  571. </div>
  572. </div>
  573. <div class="content">
  574. <p></p>
  575. </div>
  576. </div>
  577. </div>
  578. </div>
  579. <footer>
  580. <div class="base-footer-content i-footer mx-auto">
  581. <div class="ui left">
  582. <div class="p-logo i-flex i-align-center">
  583. <img class="logo-icon" src="/img/logo/logo.svg">
  584. <i class="logo-text">&copy; 2023 Agit Cloud Computing, Ltd.</i>
  585. <a id="version-a" style="margin-right: 16px; text-decoration: underline; font-size: 12px;" target="_blank" href="https://agit.ai/AgitDeveloper/AgitPythonExamples/wiki"></a>
  586. </div>
  587. </div>
  588. <div class="ui right links p-logo">
  589. <a style="margin-right: 16px; text-decoration: underline; font-size: 12px;" target="_blank" href="/agreement/terms">服务协议</a>
  590. <a style="margin-right: 16px; text-decoration: underline; font-size: 12px;" target="_blank" href="/agreement/privacy">隐私政策</a>
  591. <a style="text-decoration: underline; font-size: 12px; margin-right: 16px;" target="_blank" href="/opensource">开源软件</a>
  592. <a style="text-decoration: underline; font-size: 12px;" target="_blank" id="help-a" target="_blank" href="http://help.agit.ai/">帮助</a>
  593. </div>
  594. </div>
  595. </footer>
  596. <script src="/js/index.js?v=220846678a86246c9d7e7c46c21f20c2"></script>
  597. <script src="/vendor/plugins/vue/vue.min.js"></script>
  598. <script src="/minifyjs/head_navbar.base.js?v=220846678a86246c9d7e7c46c21f20c2"></script>
  599. <script src="/minifyjs/footer_content.base.js?v=220846678a86246c9d7e7c46c21f20c2"></script>
  600. <script src="/vendor/plugins/promise-polyfill/polyfill.min.js"></script>
  601. <script src="/vendor/plugins/cssrelpreload/loadCSS.min.js"></script>
  602. <script src="/vendor/plugins/cssrelpreload/cssrelpreload.min.js"></script>
  603. <script src="/vendor/plugins/vue-infinite-loading/vue-infinite-loading.js?v=220846678a86246c9d7e7c46c21f20c2"></script>
  604. <script src="/vendor/plugins/Qrcode/qrcode.min.js?v=220846678a86246c9d7e7c46c21f20c2"></script>
  605. <script src="/vendor/plugins/i-components/i.components.min.js?v=220846678a86246c9d7e7c46c21f20c2"></script>
  606. <script src="/vendor/plugins/vue-node-spec/node-spec.min.js?v=220846678a86246c9d7e7c46c21f20c2"></script>
  607. <script src="/vendor/plugins/jquery-migrate/jquery-migrate.min.js?v=3.0.1"></script>
  608. <script src="/vendor/plugins/jquery.areyousure/jquery.are-you-sure.js"></script>
  609. <script src="/vendor/plugins/emojify/emojify.custom.js"></script>
  610. <script src="/vendor/plugins/xterm/xterm.js"></script>
  611. </body>
  612. </html>
  613. <script>
  614. $("#createTraining").click(function(){
  615. $api.trainReachUpperLimit({repoId:Number($('.repo-id').text())}).then(data => {
  616. if (!data) return;
  617. if(data.isUpperLimit){
  618. $ITools.handleToast('error', $i18n.tr('code', 'trainCountLimit'))
  619. return
  620. }
  621. const mode = $("#branchSelect").attr("data-mode"),
  622. branch = $("#branchSelect").find("strong").text();
  623. let path = ""
  624. $(".repo-path a").each(function(index,item){
  625. if(index === 0){
  626. return
  627. }
  628. path += path === ""?$(this).attr("title"):("/"+$(this).attr("title"))
  629. })
  630. const params={
  631. scriptPath: $(".repo-path").find(".active.section").attr("title"),
  632. workSpace: path,
  633. branchName: mode === "branches" ? branch : "",
  634. tagName: mode === "branches" ? "" : branch
  635. }
  636. window.location.href = window.location.origin + $('.repo-url').text() + '/training/create?scriptFile=' + escapePound(JSON.stringify(params))
  637. })
  638. })
  639. function toUpload(el) {
  640. const tempSplit = $("#RepoSize").text().split("GB")
  641. if (tempSplit.length === 2 && tempSplit[0] >= 1) {
  642. $ITools.handleToast('error', $i18n.tr('valid', 'fileSizeLimit'))
  643. return
  644. }
  645. window.location.href = $(el).attr("data-href")
  646. }
  647. function handleShare() {
  648. $('#toShare').modal('show')
  649. }
  650. function shareLink() {
  651. $('#toCopyShareLink').modal('show')
  652. }
  653. function escapePound(str){
  654. let res=""
  655. res=str.replaceAll("%","%25")
  656. res=res.replaceAll("#","%23")
  657. res=res.replaceAll(" ","%20")
  658. res=res.replaceAll("?","%3F")
  659. return res
  660. }
  661. </script>
  662. <script src="/minifyjs/auth.js?v=220846678a86246c9d7e7c46c21f20c2"></script>
  663. <script src="/minifyjs/repo_home.js?v=220846678a86246c9d7e7c46c21f20c2"></script>