diff --git a/bridges/CyanideAndHappinessBridge.php b/bridges/CyanideAndHappinessBridge.php new file mode 100644 index 00000000..41ac096a --- /dev/null +++ b/bridges/CyanideAndHappinessBridge.php @@ -0,0 +1,37 @@ +getUri()); + + foreach ($html->find('[class*=ComicImage]') as $element) { + $date = $element->find('[class^=Author__Right] p', 0)->plaintext; + $author = str_replace('by ', '', $element->find('[class^=Author__Right] p', 1)->plaintext); + $image = $element->find('img', 0)->src; + $link = $html->find('[rel=canonical]', 0)->href; + + $item = array( + 'uid' => $link, + 'author' => $author, + 'title' => $date, + 'uri' => $link . '#comic', + 'timestamp' => str_replace('.', '-', $date) . 'T00:00:00Z', + 'content' => "" + ); + $this->items[] = $item; + } + } +}