{"_id":"@agcplayer/core","_rev":"7-328e2311b7ff5acc36b85aa5bd8a13e7","name":"@agcplayer/core","dist-tags":{"latest":"0.0.5"},"versions":{"0.0.3":{"name":"@agcplayer/core","version":"0.0.3","keywords":["agcplayer"],"author":{"name":"agcplayer"},"license":"ISC","_id":"@agcplayer/core@0.0.3","maintainers":[{"name":"agcplayer","email":"dev.widget8@gmail.com"}],"dist":{"shasum":"ef78dd75b07d5176de5be89d01293ce5214c6162","tarball":"https://registry.npmjs.org/@agcplayer/core/-/core-0.0.3.tgz","fileCount":69,"integrity":"sha512-9r38OQuUxrVD3nE4L2V2DkVKspdDTq7DurjmxtbhD9oh/2xDQmjEG9lKnkmtCc6qDM1jng07wuUJvs0el7JEkQ==","signatures":[{"sig":"MEYCIQDGT2Swk5pp1z4ZPp70DoSjvvvSmhHV5zZwTj+siw6DpwIhAML1Z+fChWPDC2BLtPYR5fLsJvywyYKOqkyN01in7DWQ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1009210},"main":"./index.js","exports":{".":"./index.js","./cache":"./cache.js","./crypto":"./crypto.js","./cheerio":"./cheerio.js","./request":"./request.js","./utils/index":"./utils/index.js","./xpath/index":"./xpath/index.js","./xpath/xpath":"./xpath/xpath.js","./localStorage":"./localStorage.js","./crypto-js/aes":"./crypto-js/aes.js","./crypto-js/md5":"./crypto-js/md5.js","./crypto-js/rc4":"./crypto-js/rc4.js","./crypto-js/core":"./crypto-js/core.js","./crypto-js/hmac":"./crypto-js/hmac.js","./crypto-js/sha1":"./crypto-js/sha1.js","./crypto-js/sha3":"./crypto-js/sha3.js","./crypto-js/index":"./crypto-js/index.js","./crypto-js/evpkdf":"./crypto-js/evpkdf.js","./crypto-js/pbkdf2":"./crypto-js/pbkdf2.js","./crypto-js/rabbit":"./crypto-js/rabbit.js","./crypto-js/sha224":"./crypto-js/sha224.js","./crypto-js/sha256":"./crypto-js/sha256.js","./crypto-js/sha384":"./crypto-js/sha384.js","./crypto-js/sha512":"./crypto-js/sha512.js","./xpath/parse5.min":"./xpath/parse5.min.js","./xpath/xmldom/dom":"./xpath/xmldom/dom.js","./xpath/xmldom/sax":"./xpath/xmldom/sax.js","./crypto-js/enc-hex":"./crypto-js/enc-hex.js","./crypto-js/blowfish":"./crypto-js/blowfish.js","./crypto-js/enc-utf8":"./crypto-js/enc-utf8.js","./crypto-js/hmac-md5":"./crypto-js/hmac-md5.js","./crypto-js/mode-cfb":"./crypto-js/mode-cfb.js","./crypto-js/mode-ctr":"./crypto-js/mode-ctr.js","./crypto-js/mode-ecb":"./crypto-js/mode-ecb.js","./crypto-js/mode-ofb":"./crypto-js/mode-ofb.js","./crypto-js/x64-core":"./crypto-js/x64-core.js","./xpath/xmldom/index":"./xpath/xmldom/index.js","./crypto-js/crypto-js":"./crypto-js/crypto-js.js","./crypto-js/enc-utf16":"./crypto-js/enc-utf16.js","./crypto-js/hmac-sha1":"./crypto-js/hmac-sha1.js","./crypto-js/hmac-sha3":"./crypto-js/hmac-sha3.js","./crypto-js/pad-pkcs7":"./crypto-js/pad-pkcs7.js","./crypto-js/ripemd160":"./crypto-js/ripemd160.js","./crypto-js/tripledes":"./crypto-js/tripledes.js","./text-encoding/index":"./text-encoding/index.js","./crypto-js/enc-base64":"./crypto-js/enc-base64.js","./crypto-js/enc-latin1":"./crypto-js/enc-latin1.js","./crypto-js/format-hex":"./crypto-js/format-hex.js","./crypto-js/cipher-core":"./crypto-js/cipher-core.js","./crypto-js/hmac-sha224":"./crypto-js/hmac-sha224.js","./crypto-js/hmac-sha256":"./crypto-js/hmac-sha256.js","./crypto-js/hmac-sha384":"./crypto-js/hmac-sha384.js","./crypto-js/hmac-sha512":"./crypto-js/hmac-sha512.js","./xpath/xmldom/entities":"./xpath/xmldom/entities.js","./crypto-js/pad-ansix923":"./crypto-js/pad-ansix923.js","./crypto-js/pad-iso10126":"./crypto-js/pad-iso10126.js","./crypto-js/pad-iso97971":"./crypto-js/pad-iso97971.js","./crypto-js/enc-base64url":"./crypto-js/enc-base64url.js","./crypto-js/pad-nopadding":"./crypto-js/pad-nopadding.js","./crypto-js/rabbit-legacy":"./crypto-js/rabbit-legacy.js","./crypto-js/format-openssl":"./crypto-js/format-openssl.js","./crypto-js/hmac-ripemd160":"./crypto-js/hmac-ripemd160.js","./crypto-js/lib-typedarrays":"./crypto-js/lib-typedarrays.js","./crypto-js/pad-zeropadding":"./crypto-js/pad-zeropadding.js","./crypto-js/mode-ctr-gladman":"./crypto-js/mode-ctr-gladman.js","./text-encoding/lib/encoding":"./text-encoding/lib/encoding.js","./text-encoding/lib/encoding-indexes":"./text-encoding/lib/encoding-indexes.js"},"gitHead":"c0983e3207a9e0bca0e048c9fb5e195169c02d8e","_npmUser":{"name":"agcplayer","email":"dev.widget8@gmail.com"},"_npmVersion":"10.9.0","description":"agcplayer widgets common modules","directories":{},"_nodeVersion":"22.12.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/core_0.0.3_1744860793498_0.525998750348579","host":"s3://npm-registry-packages-npm-production"}},"0.0.4":{"name":"@agcplayer/core","version":"0.0.4","keywords":["agcplayer"],"author":{"name":"agcplayer"},"license":"ISC","_id":"@agcplayer/core@0.0.4","maintainers":[{"name":"agcplayer","email":"dev.widget8@gmail.com"}],"dist":{"shasum":"783de7d0ed8a80ec66f49196374591d09dc34d1e","tarball":"https://registry.npmjs.org/@agcplayer/core/-/core-0.0.4.tgz","fileCount":69,"integrity":"sha512-umzH2dKXoG1zqdpkYGxRHRc97guLvE+u6RePOCuughYHsOrYg+6h2UP7YBNekH8mK5OVN72MdHI87xh/fyX11w==","signatures":[{"sig":"MEUCIQCkDkqtvMuQXR8geO8SKvvLxuzXLyejsV5P4eQ6WCxDVAIgO8mhL9QjkUN/ZiGn6iOYL2lw6e9Dr8SaEsJjjQg1JTg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1009211},"main":"./index.js","exports":{".":"./index.js","./cache":"./cache.js","./crypto":"./crypto.js","./cheerio":"./cheerio.js","./request":"./request.js","./utils/index":"./utils/index.js","./xpath/index":"./xpath/index.js","./xpath/xpath":"./xpath/xpath.js","./localStorage":"./localStorage.js","./crypto-js/aes":"./crypto-js/aes.js","./crypto-js/md5":"./crypto-js/md5.js","./crypto-js/rc4":"./crypto-js/rc4.js","./crypto-js/core":"./crypto-js/core.js","./crypto-js/hmac":"./crypto-js/hmac.js","./crypto-js/sha1":"./crypto-js/sha1.js","./crypto-js/sha3":"./crypto-js/sha3.js","./crypto-js/index":"./crypto-js/index.js","./crypto-js/evpkdf":"./crypto-js/evpkdf.js","./crypto-js/pbkdf2":"./crypto-js/pbkdf2.js","./crypto-js/rabbit":"./crypto-js/rabbit.js","./crypto-js/sha224":"./crypto-js/sha224.js","./crypto-js/sha256":"./crypto-js/sha256.js","./crypto-js/sha384":"./crypto-js/sha384.js","./crypto-js/sha512":"./crypto-js/sha512.js","./xpath/parse5.min":"./xpath/parse5.min.js","./xpath/xmldom/dom":"./xpath/xmldom/dom.js","./xpath/xmldom/sax":"./xpath/xmldom/sax.js","./crypto-js/enc-hex":"./crypto-js/enc-hex.js","./crypto-js/blowfish":"./crypto-js/blowfish.js","./crypto-js/enc-utf8":"./crypto-js/enc-utf8.js","./crypto-js/hmac-md5":"./crypto-js/hmac-md5.js","./crypto-js/mode-cfb":"./crypto-js/mode-cfb.js","./crypto-js/mode-ctr":"./crypto-js/mode-ctr.js","./crypto-js/mode-ecb":"./crypto-js/mode-ecb.js","./crypto-js/mode-ofb":"./crypto-js/mode-ofb.js","./crypto-js/x64-core":"./crypto-js/x64-core.js","./xpath/xmldom/index":"./xpath/xmldom/index.js","./crypto-js/crypto-js":"./crypto-js/crypto-js.js","./crypto-js/enc-utf16":"./crypto-js/enc-utf16.js","./crypto-js/hmac-sha1":"./crypto-js/hmac-sha1.js","./crypto-js/hmac-sha3":"./crypto-js/hmac-sha3.js","./crypto-js/pad-pkcs7":"./crypto-js/pad-pkcs7.js","./crypto-js/ripemd160":"./crypto-js/ripemd160.js","./crypto-js/tripledes":"./crypto-js/tripledes.js","./text-encoding/index":"./text-encoding/index.js","./crypto-js/enc-base64":"./crypto-js/enc-base64.js","./crypto-js/enc-latin1":"./crypto-js/enc-latin1.js","./crypto-js/format-hex":"./crypto-js/format-hex.js","./crypto-js/cipher-core":"./crypto-js/cipher-core.js","./crypto-js/hmac-sha224":"./crypto-js/hmac-sha224.js","./crypto-js/hmac-sha256":"./crypto-js/hmac-sha256.js","./crypto-js/hmac-sha384":"./crypto-js/hmac-sha384.js","./crypto-js/hmac-sha512":"./crypto-js/hmac-sha512.js","./xpath/xmldom/entities":"./xpath/xmldom/entities.js","./crypto-js/pad-ansix923":"./crypto-js/pad-ansix923.js","./crypto-js/pad-iso10126":"./crypto-js/pad-iso10126.js","./crypto-js/pad-iso97971":"./crypto-js/pad-iso97971.js","./crypto-js/enc-base64url":"./crypto-js/enc-base64url.js","./crypto-js/pad-nopadding":"./crypto-js/pad-nopadding.js","./crypto-js/rabbit-legacy":"./crypto-js/rabbit-legacy.js","./crypto-js/format-openssl":"./crypto-js/format-openssl.js","./crypto-js/hmac-ripemd160":"./crypto-js/hmac-ripemd160.js","./crypto-js/lib-typedarrays":"./crypto-js/lib-typedarrays.js","./crypto-js/pad-zeropadding":"./crypto-js/pad-zeropadding.js","./crypto-js/mode-ctr-gladman":"./crypto-js/mode-ctr-gladman.js","./text-encoding/lib/encoding":"./text-encoding/lib/encoding.js","./text-encoding/lib/encoding-indexes":"./text-encoding/lib/encoding-indexes.js"},"gitHead":"b18f5e67c971a1f1c3000043c5c6e048088862d8","_npmUser":{"name":"agcplayer","email":"dev.widget8@gmail.com"},"_npmVersion":"10.9.0","description":"agcplayer widgets common modules","directories":{},"_nodeVersion":"22.12.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/core_0.0.4_1745551007720_0.36710346821752626","host":"s3://npm-registry-packages-npm-production"}},"0.0.5":{"name":"@agcplayer/core","version":"0.0.5","description":"agcplayer widgets common modules","main":"./index.js","publishConfig":{"access":"public"},"keywords":["agcplayer"],"author":{"name":"agcplayer"},"license":"ISC","exports":{"./request":"./request.js","./localStorage":"./localStorage.js",".":"./index.js","./crypto":"./crypto.js","./cheerio":"./cheerio.js","./cache":"./cache.js","./xpath/xpath":"./xpath/xpath.js","./xpath/parse5.min":"./xpath/parse5.min.js","./xpath/index":"./xpath/index.js","./xpath/xmldom/sax":"./xpath/xmldom/sax.js","./xpath/xmldom/index":"./xpath/xmldom/index.js","./xpath/xmldom/entities":"./xpath/xmldom/entities.js","./xpath/xmldom/dom":"./xpath/xmldom/dom.js","./utils/index":"./utils/index.js","./text-encoding/index":"./text-encoding/index.js","./text-encoding/lib/encoding":"./text-encoding/lib/encoding.js","./text-encoding/lib/encoding-indexes":"./text-encoding/lib/encoding-indexes.js","./crypto-js/x64-core":"./crypto-js/x64-core.js","./crypto-js/tripledes":"./crypto-js/tripledes.js","./crypto-js/sha512":"./crypto-js/sha512.js","./crypto-js/sha384":"./crypto-js/sha384.js","./crypto-js/sha3":"./crypto-js/sha3.js","./crypto-js/sha256":"./crypto-js/sha256.js","./crypto-js/sha224":"./crypto-js/sha224.js","./crypto-js/sha1":"./crypto-js/sha1.js","./crypto-js/ripemd160":"./crypto-js/ripemd160.js","./crypto-js/rc4":"./crypto-js/rc4.js","./crypto-js/rabbit":"./crypto-js/rabbit.js","./crypto-js/rabbit-legacy":"./crypto-js/rabbit-legacy.js","./crypto-js/pbkdf2":"./crypto-js/pbkdf2.js","./crypto-js/pad-zeropadding":"./crypto-js/pad-zeropadding.js","./crypto-js/pad-pkcs7":"./crypto-js/pad-pkcs7.js","./crypto-js/pad-nopadding":"./crypto-js/pad-nopadding.js","./crypto-js/pad-iso97971":"./crypto-js/pad-iso97971.js","./crypto-js/pad-iso10126":"./crypto-js/pad-iso10126.js","./crypto-js/pad-ansix923":"./crypto-js/pad-ansix923.js","./crypto-js/mode-ofb":"./crypto-js/mode-ofb.js","./crypto-js/mode-ecb":"./crypto-js/mode-ecb.js","./crypto-js/mode-ctr":"./crypto-js/mode-ctr.js","./crypto-js/mode-ctr-gladman":"./crypto-js/mode-ctr-gladman.js","./crypto-js/mode-cfb":"./crypto-js/mode-cfb.js","./crypto-js/md5":"./crypto-js/md5.js","./crypto-js/lib-typedarrays":"./crypto-js/lib-typedarrays.js","./crypto-js/index":"./crypto-js/index.js","./crypto-js/hmac":"./crypto-js/hmac.js","./crypto-js/hmac-sha512":"./crypto-js/hmac-sha512.js","./crypto-js/hmac-sha384":"./crypto-js/hmac-sha384.js","./crypto-js/hmac-sha3":"./crypto-js/hmac-sha3.js","./crypto-js/hmac-sha256":"./crypto-js/hmac-sha256.js","./crypto-js/hmac-sha224":"./crypto-js/hmac-sha224.js","./crypto-js/hmac-sha1":"./crypto-js/hmac-sha1.js","./crypto-js/hmac-ripemd160":"./crypto-js/hmac-ripemd160.js","./crypto-js/hmac-md5":"./crypto-js/hmac-md5.js","./crypto-js/format-openssl":"./crypto-js/format-openssl.js","./crypto-js/format-hex":"./crypto-js/format-hex.js","./crypto-js/evpkdf":"./crypto-js/evpkdf.js","./crypto-js/enc-utf8":"./crypto-js/enc-utf8.js","./crypto-js/enc-utf16":"./crypto-js/enc-utf16.js","./crypto-js/enc-latin1":"./crypto-js/enc-latin1.js","./crypto-js/enc-hex":"./crypto-js/enc-hex.js","./crypto-js/enc-base64url":"./crypto-js/enc-base64url.js","./crypto-js/enc-base64":"./crypto-js/enc-base64.js","./crypto-js/crypto-js":"./crypto-js/crypto-js.js","./crypto-js/core":"./crypto-js/core.js","./crypto-js/cipher-core":"./crypto-js/cipher-core.js","./crypto-js/blowfish":"./crypto-js/blowfish.js","./crypto-js/aes":"./crypto-js/aes.js"},"_id":"@agcplayer/core@0.0.5","gitHead":"b18f5e67c971a1f1c3000043c5c6e048088862d8","_nodeVersion":"22.12.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-K95Iy4tuY6H8iUs0teKEIQjMtNfH1oL5UK/OU/wledmh7e+7GGBIIo96wv6324Abh5H3yIt8cXYC2K8cybeENQ==","shasum":"f76a4d12f08c356c44e99c5ce18cb53d32c6c65d","tarball":"https://registry.npmjs.org/@agcplayer/core/-/core-0.0.5.tgz","fileCount":69,"unpackedSize":1009211,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIA3mslwE3lGaDmP8571gAUsr5yOrgz+bqGIHGDN9LR0SAiAbmcLOovdeUytYQO+add0UvbO6qL5Dd6Pft1jU5QBGxA=="}]},"_npmUser":{"name":"agcplayer","email":"dev.widget8@gmail.com"},"directories":{},"maintainers":[{"name":"agcplayer","email":"dev.widget8@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/core_0.0.5_1745552579398_0.3922446602404366"},"_hasShrinkwrap":false}},"time":{"created":"2025-04-17T03:08:47.278Z","modified":"2025-04-25T03:42:59.846Z","0.0.1":"2025-04-17T03:08:47.702Z","0.0.2":"2025-04-17T03:26:12.371Z","0.0.3":"2025-04-17T03:33:13.777Z","0.0.4":"2025-04-25T03:16:47.943Z","0.0.5":"2025-04-25T03:42:59.657Z"},"author":{"name":"agcplayer"},"license":"ISC","keywords":["agcplayer"],"description":"agcplayer widgets common modules","maintainers":[{"name":"agcplayer","email":"dev.widget8@gmail.com"}],"readme":"# @agcplayer/core\n\n[AGC Player](https://agcplayer.com/) 小组件通用模块\n\n## Usage\n\n\n```bash\nnpm install @agcplayer/core --save-dev\npnpm install @agcplayer/core --save-dev\nyarn install @agcplayer/core --save-dev\n```\n\n\n```javascript\nconst { request, success, error, Cheerio, Cache } = require(\"@agcplayer/core\");\n\nconst cheerio = new Cheerio();\nconst cache = new Cache();\n\nasync function detail({ vod_id, type_id }) {\n    if (cache.get(`detail:${vod_id}`)) {\n        return success(cache.get(`detail:${vod_id}`));\n    }\n\n    try {\n        const response = await request(appConfig.playUrl(vod_id), {\n            headers\n        });\n        const html = await response.text();\n\n        const $ = cheerio.load(html);\n\n        const vod_name = unescapeEntity($(\".movie-details .card-title\").text());\n        const vod_pic = $(\".poster-container .img-fluid\").attr(\"src\");\n        const vod_blurb = unescapeEntity($(\".movie-description > p\").text());\n        const vod_actor = $(\".movie-info .movie-info-item\")\n            .eq(0)\n            .find(\"p\")\n            .text();\n        const vod_remarks = $(\".poster-container .remarks-badge\").text();\n        const vod_year = \"\";\n        const vod_link = [];\n        const similar = cache.get(`type:${type_id}:page:1`) || [];\n\n        $(\".play-buttons .play-button\").each((_, item) => {\n            const name = $(item).text();\n            const url = extractUrlFromButton($(item).attr(\"onclick\"));\n            vod_link.push({\n                name,\n                url\n            });\n        });\n\n        const vod_info = {\n            vod_blurb,\n            vod_id,\n            vod_name,\n            vod_remarks,\n            vod_pic,\n            vod_year,\n            vod_actor,\n            vod_time: \"\",\n            vod_lang: \"cn\",\n            vod_area: \"\",\n            vod_class: \"\",\n            similar,\n            vod_sources: [\n                {\n                    source_name: \"选集列表\",\n                    vod_play_list: {\n                        url_count: vod_link.length,\n                        urls: vod_link\n                    }\n                }\n            ]\n        };\n\n        cache.set(\"detail:\" + vod_id, vod_info);\n\n        return success(vod_info);\n    } catch (e) {\n        return error(e.message);\n    }\n}\n\n```","readmeFilename":"README.md"}