Skip to content

Commit

Permalink
use explicit responseType for the FakeAgent got instance
Browse files Browse the repository at this point in the history
  • Loading branch information
Supinic committed Oct 6, 2024
1 parent 5365323 commit 14f02be
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion commands/comment/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ module.exports = {
Whitelist_Response: null,
Code: (async function comment () {
const response = await sb.Got.get("FakeAgent")({
url: "http://www.randomyoutubecomment.com"
url: "http://www.randomyoutubecomment.com",
responseType: "text"
});

const $ = sb.Utils.cheerio(response.body);
Expand Down
9 changes: 6 additions & 3 deletions commands/doesnotexist/fetch-methods.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,8 @@ module.exports = {
descriptions: [`<code>automobile</code> - <a href="https://www.thisautomobiledoesnotexist.com/">This automobile does not exist</a>`],
execute: async (context, type) => {
const response = await sb.Got.get("FakeAgent")({
url: "https://www.thisautomobiledoesnotexist.com"
url: "https://www.thisautomobiledoesnotexist.com",
responseType: "text"
});

const $ = sb.Utils.cheerio(response.body);
Expand Down Expand Up @@ -250,7 +251,8 @@ module.exports = {
descriptions: [`<code>fuckeduphomer</code> - <a href="https://www.thisfuckeduphomerdoesnotexist.com/">This fucked up Homer does not exist</a>`],
execute: async () => {
const response = await sb.Got.get("FakeAgent")({
url: "https://www.thisfuckeduphomerdoesnotexist.com"
url: "https://www.thisfuckeduphomerdoesnotexist.com",
responseType: "text"
});

const $ = sb.Utils.cheerio(response.body);
Expand All @@ -269,7 +271,8 @@ module.exports = {
let data = await sb.Cache.getByPrefix(MP_CACHE_KEY);
if (!data) {
const response = await sb.Got.get("FakeAgent")({
url: "https://vole.wtf/this-mp-does-not-exist"
url: "https://vole.wtf/this-mp-does-not-exist",
responseType: "text"
});

const $ = sb.Utils.cheerio(response.body);
Expand Down
3 changes: 2 additions & 1 deletion crons/yoink-soundcloud-client-id/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ export const definition = {
}

const mainPageResponse = await sb.Got.get("FakeAgent")({
url: "https://soundcloud.com"
url: "https://soundcloud.com",
responseType: "text"
});

const $ = sb.Utils.cheerio(mainPageResponse.body);
Expand Down

0 comments on commit 14f02be

Please sign in to comment.