mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-04-03 16:19:45 +00:00
[DailyShirts] Add daily shirt sites (#2962)
This commit is contained in:
parent
08c1f55f4a
commit
e99cbf21b2
34
bridges/QwerteeBridge.php
Normal file
34
bridges/QwerteeBridge.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
class QwerteeBridge extends BridgeAbstract
|
||||
{
|
||||
const NAME = 'Qwertee';
|
||||
const URI = 'https://www.qwertee.com';
|
||||
const DESCRIPTION = 'Returns the daily designs';
|
||||
const MAINTAINER = 'Bockiii';
|
||||
const PARAMETERS = [];
|
||||
|
||||
const CACHE_TIMEOUT = 60 * 60 * 3; // 3 hours
|
||||
|
||||
public function collectData()
|
||||
{
|
||||
$html = getSimpleHTMLDOM(self::URI);
|
||||
|
||||
foreach ($html->find('div.big-slides', 0)->find('div.big-slide') as $element) {
|
||||
$title = $element->find('div.index-tee', 0)->getAttribute('data-name', 0);
|
||||
$today = date('m/d/Y');
|
||||
$item = [];
|
||||
$item['uri'] = self::URI;
|
||||
$item['title'] = $title;
|
||||
$item['uid'] = $title;
|
||||
$item['timestamp'] = $today;
|
||||
$item['content'] = '<a href="'
|
||||
. $item['uri']
|
||||
. '"><img src="'
|
||||
. $element->find('img', 0)->getAttribute('src', 0)
|
||||
. '" /></a>';
|
||||
|
||||
$this->items[] = $item;
|
||||
}
|
||||
}
|
||||
}
|
37
bridges/RiptApparelBridge.php
Normal file
37
bridges/RiptApparelBridge.php
Normal file
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
class RiptApparelBridge extends BridgeAbstract
|
||||
{
|
||||
const NAME = 'RIPT Apparel';
|
||||
const URI = 'https://www.riptapparel.com';
|
||||
const DESCRIPTION = 'Returns the daily designs';
|
||||
const MAINTAINER = 'Bockiii';
|
||||
const PARAMETERS = [];
|
||||
|
||||
const CACHE_TIMEOUT = 60 * 60 * 3; // 3 hours
|
||||
|
||||
public function collectData()
|
||||
{
|
||||
$html = getSimpleHTMLDOM(self::URI);
|
||||
|
||||
foreach ($html->find('div.daily-designs', 0)->find('div.collection') as $element) {
|
||||
$title = $element->find('div.design-info', 0)->find('div.title', 0)->innertext;
|
||||
$uri = self::URI . $element->find('div.design-info', 0)->find('a', 0)->href;
|
||||
$today = date('m/d/Y');
|
||||
$imagesrcset = $element->find('div.design-images', 0)->find('div[data-subtype="Mens"]', 0)->find('img', 0);
|
||||
$image = rtrim(explode(',', $imagesrcset->getAttribute('data-srcset'))[2], ' 900w');
|
||||
$item = [];
|
||||
$item['uri'] = $uri;
|
||||
$item['title'] = $title;
|
||||
$item['uid'] = $title;
|
||||
$item['timestamp'] = $today;
|
||||
$item['content'] = '<a href="'
|
||||
. $uri
|
||||
. '"><img src="'
|
||||
. $image
|
||||
. '" /></a>';
|
||||
|
||||
$this->items[] = $item;
|
||||
}
|
||||
}
|
||||
}
|
38
bridges/TeefuryBridge.php
Normal file
38
bridges/TeefuryBridge.php
Normal file
@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
class TeefuryBridge extends BridgeAbstract
|
||||
{
|
||||
const NAME = 'Teefury';
|
||||
const URI = 'https://www.teefury.com';
|
||||
const DESCRIPTION = 'Returns the daily designs';
|
||||
const MAINTAINER = 'Bockiii';
|
||||
const PARAMETERS = [];
|
||||
|
||||
const CACHE_TIMEOUT = 60 * 60 * 3; // 3 hours
|
||||
|
||||
public function collectData()
|
||||
{
|
||||
$html = getSimpleHTMLDOM(self::URI);
|
||||
$html = defaultLinkTo($html, self::URI);
|
||||
|
||||
foreach ($html->find('div.odad-card__wrapper') as $element) {
|
||||
$titletext = $element->find('p', 0)->innertext;
|
||||
$title = trim(explode('<br>', $titletext)[0]);
|
||||
$today = date('m/d/Y');
|
||||
$uri = self::URI . $element->find('div.js-odad-link', 1)->attr['data-link'];
|
||||
$item = [];
|
||||
$item['uri'] = $uri;
|
||||
$item['title'] = $title;
|
||||
$item['uid'] = $title;
|
||||
$item['timestamp'] = $today;
|
||||
$item['content'] = $element->find('p', 0)
|
||||
. '<br><a href="'
|
||||
. $uri
|
||||
. '"><img src="'
|
||||
. $element->find('div.js-odad-link', 1)->find('img', 0)->attr['src']
|
||||
. '" /></a>';
|
||||
|
||||
$this->items[] = $item;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user