From f826070c560661c7d2eff0bb16b7782cc524937d Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 10 Feb 2014 23:03:58 +0400 Subject: af_comics: add happyjar --- plugins/af_comics/init.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'plugins/af_comics/init.php') diff --git a/plugins/af_comics/init.php b/plugins/af_comics/init.php index e8b5a00cc..5d3ccf072 100644 --- a/plugins/af_comics/init.php +++ b/plugins/af_comics/init.php @@ -30,6 +30,7 @@ class Af_Comics extends Plugin {
  • Dilbert
  • Explosm
  • GoComics
  • +
  • Happy Jar
  • Penny Arcade
  • Three word phrase
  • Whomp
  • "; @@ -48,12 +49,21 @@ class Af_Comics extends Plugin { if (strpos($article["guid"], "bunicomic.com") !== FALSE || strpos($article["guid"], "buttersafe.com") !== FALSE || strpos($article["guid"], "whompcomic.com") !== FALSE || + strpos($article["guid"], "happyjar.com") !== FALSE || strpos($article["guid"], "csectioncomics.com") !== FALSE) { if (strpos($article["plugin_data"], "af_comics,$owner_uid:") === FALSE) { + + // lol at people who block clients by user agent + // oh noes my ad revenue Q_Q + + $res = fetch_file_contents($article["link"], false, false, false, + false, false, 0, + "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)"); + $doc = new DOMDocument(); - @$doc->loadHTML(fetch_file_contents($article["link"])); + @$doc->loadHTML($res); $basenode = false; -- cgit v1.2.3-54-g00ecf