Fixed Vixen scraper, using new token URL for trailers.
This commit is contained in:
@@ -45,7 +45,7 @@ queue.define('http', async ({
|
||||
options = {},
|
||||
}) => {
|
||||
if (body) {
|
||||
logger.silly(`${method.toUpperCase()} ${url} with ${body}`);
|
||||
logger.silly(`${method.toUpperCase()} ${url} with ${JSON.stringify(body)}`);
|
||||
} else {
|
||||
logger.silly(`${method.toUpperCase()} ${url}`);
|
||||
}
|
||||
@@ -73,8 +73,10 @@ queue.define('http', async ({
|
||||
|
||||
return {
|
||||
...res,
|
||||
originalRes: res,
|
||||
html,
|
||||
json,
|
||||
pipe: res.pipe,
|
||||
ok: res.statusCode >= 200 && res.statusCode <= 299,
|
||||
code: res.statusCode,
|
||||
status: res.statusCode,
|
||||
@@ -85,7 +87,7 @@ queue.define('http', async ({
|
||||
|
||||
async function get(url, headers, options) {
|
||||
return queue.push('http', {
|
||||
method: 'get',
|
||||
method: 'GET',
|
||||
url,
|
||||
headers,
|
||||
options,
|
||||
@@ -94,6 +96,7 @@ async function get(url, headers, options) {
|
||||
|
||||
async function post(url, body, headers, options) {
|
||||
return queue.push('http', {
|
||||
method: 'POST',
|
||||
url,
|
||||
body,
|
||||
headers,
|
||||
|
||||
Reference in New Issue
Block a user