Skip to content

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
austinhuang0131 authored Dec 15, 2019
1 parent 2508ab9 commit 0cffff2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1878,6 +1878,7 @@ bot.dialog('/9gag1',[
}
else if (results.response.entity.endsWith("Hot")) {
request("https://9gag.com/"+nsfw.find(i => {return i.user === session.message.address.user.id;}).gag+"/hot", function(err, response, body) {
console.log(body.split("<script type=\"text/javascript\">window._config = JSON.parse(\"")[1].split("\");</script>\n<script type=\"text/javascript\" src=\"")[0].replace(/\\/gi, ""))
var res = JSON.parse(body.split("<script type=\"text/javascript\">window._config = JSON.parse(\"")[1].split("\");</script>\n<script type=\"text/javascript\" src=\"")[0].replace(/\\/gi, "")).data;
if (err || !res) {
session.send("An error occured. Retry?");
Expand Down

0 comments on commit 0cffff2

Please sign in to comment.