I'm trying to get the json that the url returns. But with this call it returns a response without the data and a status of 200
url: https://www.instagram.com/explore/tags/jeep/?a=1
Code:
const express = require("express");
const fetch = require("node-fetch")
const router = express.Router();
const response = await fetch('https://www.instagram.com/explore/tags/jeep/?__a=1');
const data = await response;
console.log(data)
module.exports = router;
What is shown in the console:
Response {
size: 0,
timeout: 0,
[Symbol(Body internals)]: {
body: Gunzip {
_writeState: [Uint32Array],
_readableState: [ReadableState],
_events: [Object: null prototype],
_eventsCount: 5,
_maxListeners: undefined,
_writableState: [WritableState],
allowHalfOpen: true,
bytesWritten: 0,
_handle: [Zlib],
_outBuffer: <Buffer 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 01 e2 33 19 87 00 00 00 40 00 00 00 00 00 00 00 41 e2 33 19 87 00 00 00 40 00 00 00 00 00 00 00 81 e2 ... 16334 more bytes>,
_outOffset: 0,
_chunkSize: 16384,
_defaultFlushFlag: 2,
_finishFlushFlag: 2,
_defaultFullFlushFlag: 3,
_info: undefined,
_maxOutputLength: 4294967296,
_level: -1,
_strategy: 0,
[Symbol(kCapture)]: false,
[Symbol(kCallback)]: null,
[Symbol(kError)]: null
},
disturbed: false,
error: null
},
[Symbol(Response internals)]: {
url: 'https://www.instagram.com/accounts/login/?next=/explore/tags/jeep/',
status: 200,
statusText: 'OK',
headers: Headers { [Symbol(map)]: [Object: null prototype] },
counter: 1
}
}
How do I get the normal json with all the hashtag data?