liangzi.js 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. /*
  2. * @File : liangzi.js
  3. * @Author : jade
  4. * @Date : 2024/1/24 9:15
  5. * @Email : jadehh@1ive.com
  6. * @Software : Samples
  7. * @Desc : 量子资源
  8. */
  9. import {VodSpider} from "./vodSpider.js";
  10. class LiangziSpider extends VodSpider {
  11. constructor() {
  12. super();
  13. this.siteUrl = "https://cj.lzcaiji.com"
  14. this.remove18 = true
  15. }
  16. getAppName() {
  17. return "量子资源"
  18. }
  19. getName() {
  20. return "🐝┃量子资源┃🐝"
  21. }
  22. getJSName() {
  23. return "liangzi"
  24. }
  25. getType() {
  26. return 3
  27. }
  28. async spiderInit(inReq) {
  29. await super.spiderInit(inReq);
  30. }
  31. async init(cfg) {
  32. await super.init(cfg);
  33. await this.spiderInit(null)
  34. }
  35. }
  36. let spider = new LiangziSpider()
  37. async function init(cfg) {
  38. await spider.init(cfg)
  39. }
  40. async function home(filter) {
  41. return await spider.home(filter)
  42. }
  43. async function homeVod() {
  44. return await spider.homeVod()
  45. }
  46. async function category(tid, pg, filter, extend) {
  47. return await spider.category(tid, pg, filter, extend)
  48. }
  49. async function detail(id) {
  50. return await spider.detail(id)
  51. }
  52. async function play(flag, id, flags) {
  53. return await spider.play(flag, id, flags)
  54. }
  55. async function search(wd, quick) {
  56. return await spider.search(wd, quick)
  57. }
  58. async function proxy(segments, headers) {
  59. return await spider.proxy(segments, headers)
  60. }
  61. export function __jsEvalReturn() {
  62. return {
  63. init: init,
  64. home: home,
  65. homeVod: homeVod,
  66. category: category,
  67. detail: detail,
  68. play: play,
  69. search: search,
  70. proxy: proxy
  71. };
  72. }
  73. export {spider}