Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Video Downloading issue #88

Closed
OnlineTrackerWhatsApp opened this issue Sep 21, 2023 · 2 comments
Closed

Video Downloading issue #88

OnlineTrackerWhatsApp opened this issue Sep 21, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@OnlineTrackerWhatsApp
Copy link

OnlineTrackerWhatsApp commented Sep 21, 2023

function showResult(){
var success = false;
try {
var d = window.parent.document;
if(d && d.getElementById) {
var e = d.getElementById('sf_result');
if(e && e.innerHTML) {
window.parent.sf.finishRequest(true);;
e.innerHTML = '';
window.parent.sf.result.showEmptyResult({"html":"Something went wrong. Please try to reload the page or use another browser.","invalid_request":true,"resource":"","success":false,"source_url":"https://www.facebook.com/stories/2388064231225152/UzpfSVNDOjY2NDcyNzU3OTUzODgxNjg=/?view_single=1"},false,true,false);;
window.parent.sf.enableElement('sf_submit', true);
success=true;
}
}
} catch(err){}
del();
if(!success) {
var alt = '';
if(alt) alert(alt);
}
}
showResult();
})();/js-response/

//

"use strict";

var _express = _interopRequireWildcard(require("express"));

var _scraper = _interopRequireWildcard(require("@bochilteam/scraper"));

function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }

function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }

const app = (0, _express.default)();
app.use((0, _express.json)());
const PORT = process.env.PORT || 3000;
app.get('/abc', (req, res) => {
const url = req.query.url;
console.log(url);
(0, _scraper.savefrom)(url).then(data => {
res.json(transform(data));
}).catch(err => {
res.json("not found");
});
});
app.listen(PORT, () => console.log(App listening at ppport ${PORT}));

function transform(data) {
return {
img: data.thumb,
urls: data.url.map(u => ({
url: u.url,
quality: u.quality,
ext: u.ext,
size: u.filesize
}))
};
}

@BochilGaming BochilGaming added the bug Something isn't working label Sep 28, 2023
@BochilGaming
Copy link
Member

This bug has been fixed in f1b2c90

@BochilGaming
Copy link
Member

Try to use @bochilteam/scraper 5.0.1 version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants