From 5722a6c1390c34886339b286927300476f24fe7f Mon Sep 17 00:00:00 2001 From: Monsieur Poutounours <30292704+MonsieurPoutounours@users.noreply.github.com> Date: Mon, 10 Sep 2018 21:56:55 +0200 Subject: [PATCH] Adding a bridge for theyetee.com (#809) * Adding a bridge for theyetee.com The bridge fetches daily shirts at theyetee.com. The Yetee offers two new shirts each day, but you can buy them only for a few hours ! Unfortunately, the site don't provide RSS feed, so the only way to keep up to date on new shirt is their daily mailing ... until now ! --- bridges/TheYeteeBridge.php | 41 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 bridges/TheYeteeBridge.php diff --git a/bridges/TheYeteeBridge.php b/bridges/TheYeteeBridge.php new file mode 100644 index 00000000000..3d44984ccdf --- /dev/null +++ b/bridges/TheYeteeBridge.php @@ -0,0 +1,41 @@ +find('.hero-col'); + foreach($div as $element) { + + $item = array(); + $item['enclosures'] = array(); + + $title = $element->find('h2', 0)->plaintext; + $item['title'] = $title; + + $author = trim($element->find('div[class=credit]', 0)->plaintext); + $item['author'] = $author; + + $uri = $element->find('div[class=controls] a', 0)->href; + $item['uri'] = static::URI.$uri; + + $content = '

'.$element->find('section[class=product-listing-info] p', -1)->plaintext.'

'; + $photos = $element->find('a[class=js-modaal-gallery] img'); + foreach($photos as $photo) { + $content = $content."
"; + $item['enclosures'][] = $photo->src; + } + $item['content'] = $content; + + $this->items[] = $item; + } + } +}