mirror of
https://github.com/vega-org/vega-providers.git
synced 2026-04-17 23:51:44 +00:00
build
This commit is contained in:
4
dist/protonMovies/meta.js
vendored
4
dist/protonMovies/meta.js
vendored
@@ -15,8 +15,9 @@ const getMeta = function (_a) {
|
|||||||
var _b, _c, _d, _e, _f;
|
var _b, _c, _d, _e, _f;
|
||||||
try {
|
try {
|
||||||
const { axios, cheerio, getBaseUrl } = providerContext;
|
const { axios, cheerio, getBaseUrl } = providerContext;
|
||||||
|
const baseUrl = yield getBaseUrl("protonMovies");
|
||||||
console.log("all", link);
|
console.log("all", link);
|
||||||
const res = yield axios.get(link);
|
const res = yield axios.get(`${baseUrl}${link}`);
|
||||||
const data = res.data;
|
const data = res.data;
|
||||||
function decodeHtml(encodedArray) {
|
function decodeHtml(encodedArray) {
|
||||||
// Join array elements into a single string
|
// Join array elements into a single string
|
||||||
@@ -54,7 +55,6 @@ const getMeta = function (_a) {
|
|||||||
.map((i, el) => $(el).text())
|
.map((i, el) => $(el).text())
|
||||||
.slice(0, 3)
|
.slice(0, 3)
|
||||||
.get();
|
.get();
|
||||||
const baseUrl = yield getBaseUrl("protonMovies");
|
|
||||||
const links = [];
|
const links = [];
|
||||||
if (type === "movie") {
|
if (type === "movie") {
|
||||||
const directLinks = [];
|
const directLinks = [];
|
||||||
|
|||||||
36
dist/protonMovies/posts.js
vendored
36
dist/protonMovies/posts.js
vendored
@@ -30,25 +30,25 @@ const getSearchPosts = function (_a) {
|
|||||||
exports.getSearchPosts = getSearchPosts;
|
exports.getSearchPosts = getSearchPosts;
|
||||||
function posts(_a) {
|
function posts(_a) {
|
||||||
return __awaiter(this, arguments, void 0, function* ({ url, baseUrl, signal, axios, cheerio, }) {
|
return __awaiter(this, arguments, void 0, function* ({ url, baseUrl, signal, axios, cheerio, }) {
|
||||||
function decodeHtml(encodedArray) {
|
|
||||||
// Join array elements into a single string
|
|
||||||
const joined = encodedArray.join("");
|
|
||||||
// Replace escaped quotes
|
|
||||||
const unescaped = joined.replace(/\\"/g, '"').replace(/\\'/g, "'");
|
|
||||||
// Remove remaining escape characters
|
|
||||||
const cleaned = unescaped
|
|
||||||
.replace(/\\n/g, "\n")
|
|
||||||
.replace(/\\t/g, "\t")
|
|
||||||
.replace(/\\r/g, "\r");
|
|
||||||
// Convert literal string representations back to characters
|
|
||||||
const decoded = cleaned
|
|
||||||
.replace(/"/g, '"')
|
|
||||||
.replace(/</g, "<")
|
|
||||||
.replace(/>/g, ">")
|
|
||||||
.replace(/&/g, "&");
|
|
||||||
return decoded;
|
|
||||||
}
|
|
||||||
try {
|
try {
|
||||||
|
function decodeHtml(encodedArray) {
|
||||||
|
// Join array elements into a single string
|
||||||
|
const joined = encodedArray.join("");
|
||||||
|
// Replace escaped quotes
|
||||||
|
const unescaped = joined.replace(/\\"/g, '"').replace(/\\'/g, "'");
|
||||||
|
// Remove remaining escape characters
|
||||||
|
const cleaned = unescaped
|
||||||
|
.replace(/\\n/g, "\n")
|
||||||
|
.replace(/\\t/g, "\t")
|
||||||
|
.replace(/\\r/g, "\r");
|
||||||
|
// Convert literal string representations back to characters
|
||||||
|
const decoded = cleaned
|
||||||
|
.replace(/"/g, '"')
|
||||||
|
.replace(/</g, "<")
|
||||||
|
.replace(/>/g, ">")
|
||||||
|
.replace(/&/g, "&");
|
||||||
|
return decoded;
|
||||||
|
}
|
||||||
const res = yield axios.get(url, {
|
const res = yield axios.get(url, {
|
||||||
headers: {
|
headers: {
|
||||||
referer: baseUrl,
|
referer: baseUrl,
|
||||||
|
|||||||
Reference in New Issue
Block a user