Added Amateur Allure.

This commit is contained in:
2020-03-01 05:28:08 +01:00
parent 3290a5f686
commit e57f440665
17 changed files with 227 additions and 21 deletions

View File

@@ -94,6 +94,8 @@ async function extractItem(source) {
}
async function fetchItem(source, index, existingItemsBySource, domain, role, attempt = 1, originalSource = null) {
if (!source) return null;
try {
if (Array.isArray(source)) {
if (source.every(sourceX => !!sourceX.quality)) {
@@ -124,7 +126,12 @@ async function fetchItem(source, index, existingItemsBySource, domain, role, att
logger.verbose(`Fetching ${domain} ${role} from ${source.src || source}`);
// const res = await bhttp.get(source.src || source);
const res = await get(source.src || source);
const res = await get(source.src || source, {
headers: {
...(source.referer && { referer: source.referer }),
...(source.host && { host: source.host }),
},
});
if (res.statusCode === 200) {
const { pathname } = new URL(source.src || source);