mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-03 17:44:48 +02:00
Reformat codebase v4 (#2872)
Reformat code base to PSR12 Co-authored-by: rssbridge <noreply@github.com>
This commit is contained in:
parent
66568e3a39
commit
4f75591060
398 changed files with 58607 additions and 56442 deletions
|
@ -1,39 +1,39 @@
|
|||
<?php
|
||||
class TheYeteeBridge extends BridgeAbstract {
|
||||
|
||||
const MAINTAINER = 'Monsieur Poutounours';
|
||||
const NAME = 'TheYetee';
|
||||
const URI = 'https://theyetee.com';
|
||||
const CACHE_TIMEOUT = 14400; // 4 h
|
||||
const DESCRIPTION = 'Fetch daily shirts from The Yetee';
|
||||
class TheYeteeBridge extends BridgeAbstract
|
||||
{
|
||||
const MAINTAINER = 'Monsieur Poutounours';
|
||||
const NAME = 'TheYetee';
|
||||
const URI = 'https://theyetee.com';
|
||||
const CACHE_TIMEOUT = 14400; // 4 h
|
||||
const DESCRIPTION = 'Fetch daily shirts from The Yetee';
|
||||
|
||||
public function collectData(){
|
||||
public function collectData()
|
||||
{
|
||||
$html = getSimpleHTMLDOM(self::URI);
|
||||
|
||||
$html = getSimpleHTMLDOM(self::URI);
|
||||
$div = $html->find('.module_timed-item.is--full');
|
||||
foreach ($div as $element) {
|
||||
$item = [];
|
||||
$item['enclosures'] = [];
|
||||
|
||||
$div = $html->find('.module_timed-item.is--full');
|
||||
foreach($div as $element) {
|
||||
$title = $element->find('h2', 0)->plaintext;
|
||||
$item['title'] = $title;
|
||||
|
||||
$item = array();
|
||||
$item['enclosures'] = array();
|
||||
$author = trim($element->find('.module_timed-item--artist a', 0)->plaintext);
|
||||
$item['author'] = $author;
|
||||
|
||||
$title = $element->find('h2', 0)->plaintext;
|
||||
$item['title'] = $title;
|
||||
$item['uri'] = static::URI;
|
||||
|
||||
$author = trim($element->find('.module_timed-item--artist a', 0)->plaintext);
|
||||
$item['author'] = $author;
|
||||
$content = '<p>' . $title . ' by ' . $author . '</p>';
|
||||
$photos = $element->find('a.img');
|
||||
foreach ($photos as $photo) {
|
||||
$content = $content . "<br /><img src='$photo->href' />";
|
||||
$item['enclosures'][] = $photo->src;
|
||||
}
|
||||
$item['content'] = $content;
|
||||
|
||||
$item['uri'] = static::URI;
|
||||
|
||||
$content = '<p>' . $title . ' by ' . $author . '</p>';
|
||||
$photos = $element->find('a.img');
|
||||
foreach($photos as $photo) {
|
||||
$content = $content . "<br /><img src='$photo->href' />";
|
||||
$item['enclosures'][] = $photo->src;
|
||||
}
|
||||
$item['content'] = $content;
|
||||
|
||||
$this->items[] = $item;
|
||||
}
|
||||
}
|
||||
$this->items[] = $item;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue