Compare commits

...

4 Commits

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 MiB

After

Width:  |  Height:  |  Size: 5.2 MiB

@ -8342,7 +8342,6 @@ function scaffoldCustomParser(url) {
if (!fs.existsSync(dir)) {
newParser = true;
confirmCreateDir(dir, "Creating ".concat(hostname, " directory"));
confirmCreateDir("./fixtures/".concat(hostname), 'Creating fixtures directory');
}
confirm(mercury.fetchResource, [url], 'Fetching fixture', newParser);
@ -8379,8 +8378,7 @@ function savePage($, _ref, newParser) {
hostname = _URL$parse5.hostname;
spinner.succeed();
var filename = new Date().getTime();
var file = "./fixtures/".concat(hostname, "/").concat(filename, ".html"); // fix http(s) relative links:
var file = "./fixtures/".concat(hostname, ".html"); // fix http(s) relative links:
makeLinksAbsolute$$1($('*').first(), $, url);
$('[src], [href]').each(function (index, node) {

File diff suppressed because one or more lines are too long

12
dist/mercury.js vendored

@ -7846,6 +7846,12 @@ var RootExtractor = {
};
}
var extendedResults = {};
if (extractor.extend) {
extendedResults = selectExtendedTypes(extractor.extend, opts);
}
var title = extractResult(_objectSpread({}, opts, {
type: 'title'
}));
@ -7894,12 +7900,6 @@ var RootExtractor = {
url = _ref3.url,
domain = _ref3.domain;
var extendedResults = {};
if (extractor.extend) {
extendedResults = selectExtendedTypes(extractor.extend, opts);
}
return _objectSpread({
title: title,
content: content,

File diff suppressed because one or more lines are too long

@ -223,6 +223,10 @@ const RootExtractor = {
content,
};
}
let extendedResults = {};
if (extractor.extend) {
extendedResults = selectExtendedTypes(extractor.extend, opts);
}
const title = extractResult({ ...opts, type: 'title' });
const date_published = extractResult({ ...opts, type: 'date_published' });
const author = extractResult({ ...opts, type: 'author' });
@ -247,11 +251,6 @@ const RootExtractor = {
type: 'url_and_domain',
}) || { url: null, domain: null };
let extendedResults = {};
if (extractor.extend) {
extendedResults = selectExtendedTypes(extractor.extend, opts);
}
return {
title,
content,

Loading…
Cancel
Save