This commit is contained in:
Dragon Fire
2021-03-18 17:09:19 -04:00
parent a1bbaed04b
commit 9d10af5d8a
+3 -1
View File
@@ -66,7 +66,9 @@ module.exports = class RottenTomatoesCommand extends Command {
}
async fetchMovie(id) {
const { text } = await request.get(`https://www.rottentomatoes.com/api/private/v1.0/movies/${id}`);
const { text } = await request
.get(`https://www.rottentomatoes.com/api/private/v1.0/movies/${id}`)
.set({ 'User-Agent': new UserAgent().toString() });
return JSON.parse(text);
}
};