module.exports = {
	getWP : function(theURL, bot, channelID) {
		var request = require('request');
		request(theURL, function (error, response, body) {
			if (!error && response.statusCode == 200) {
			
				imageStart = body.indexOf("//4walled.cc/show");
				imageUrl = "https:" + body.substring((imageStart), (imageStart + 290))
				resStart = imageUrl.indexOf("Resolution");
				resText = imageUrl.substring((resStart), (resStart + 40))
				resEnd = resText.indexOf("'")
				resolution = resText.substring(0, resEnd)
				imageEnd = imageUrl.indexOf("target") - 2
				imageUrl = imageUrl.substring(0, imageEnd)
				
					request(imageUrl, function (error, response, body) {
						if (!error && response.statusCode == 200) {
							imageStart = body.indexOf("//4walled.cc/src");
							imageUrl = "https:" + body.substring((imageStart), (imageStart + 90))
							imageEnd = imageUrl.indexOf("\"")
							imageUrl = imageUrl.substring(0, imageEnd)
							
							bot.sendMessage({
								to: channelID,
								message: imageUrl + " " + resolution
							})
							
						}
						
						else{
							bot.sendMessage({
								to: channelID,
								message: "Image not found"
							})
						}
					})
			}
		})
	}
}
@@ -53,21 +53,30 @@
 hannelID
+, cheerio
 ) %7B%0D%0A
-
 %09%09var re
@@ -533,24 +533,26 @@
 esEnd)%0D%0A%09%09%09%09
+//
 imageEnd = i
@@ -582,24 +582,26 @@
 %22) - 2%0D%0A%09%09%09%09
+//
 imageUrl = i
@@ -634,24 +634,417 @@
 End)%0D%0A%09%09%09%09%0D%0A
+%09%09%09%09var parsed = cheerio.load(body);%0D%0A%09%09%09%09%0D%0A%09%09%09%09var images = %5B%5D;%0D%0A%09%09%09%09parsed('a').map(function(i, link) %7B%0D%0A%09%09%09%09%09var href = cheerio(link).attr('href')%0D%0A%09%09%09%09%09if (!href.match('//4walled.cc')) return%0D%0A%09%09%09%09%09images.push(href)%0D%0A%09%09%09%09%7D);%0D%0A%09%09%09%09%0D%0A%09%09%09%09console.log(images);%0D%0A%09%09%09%09%0D%0A%09%09%09%09var imageUrl = %22http:%22 + images%5BMath.floor(Math.random() * images.length) + 5%5D;%0D%0A%09%09%09%09console.log(imageUrl);%0D%0A%09%09%09%09%0D%0A%09%09%09%09%0D%0A
 %09%09%09%09%09request
@@ -1653,9 +1653,11 @@
 %7D)%0D%0A%09%7D%0D%0A
-
 %7D
+%0D%0A

Update 4walled.js