mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-07-31 08:05:58 +02:00
[CentreFranceBridge] Add bridge (#4189)
* [CentreFranceBridge] Add bridge * [CentreFranceBridge] Fix bridge * [CentreFranceBridge] Fix bridge * [CentreFranceBridge] Improved icon choice * [CentreFranceBridge] Fetch additional data from articles * [CentreFranceBridge] New parameter to allow client to control how many articles to fetch * [CentreFranceBridge] Improve bridge name based on existing parameters * [CentreFranceBridge] Fixed some edge cases * refactor: reorder * fix --------- Co-authored-by: Dag <me@dvikan.no>
This commit is contained in:
parent
b25a779d98
commit
829d570f8e
3 changed files with 281 additions and 7 deletions
|
@ -142,7 +142,6 @@ function getContents(
|
|||
* when returning plaintext.
|
||||
* @param string $defaultSpanText Specifies the replacement text for `<span />`
|
||||
* tags when returning plaintext.
|
||||
* @return false|simple_html_dom Contents as simplehtmldom object.
|
||||
*/
|
||||
function getSimpleHTMLDOM(
|
||||
$url,
|
||||
|
@ -154,11 +153,12 @@ function getSimpleHTMLDOM(
|
|||
$stripRN = true,
|
||||
$defaultBRText = DEFAULT_BR_TEXT,
|
||||
$defaultSpanText = DEFAULT_SPAN_TEXT
|
||||
) {
|
||||
): \simple_html_dom {
|
||||
$html = getContents($url, $header ?? [], $opts ?? []);
|
||||
if ($html === '') {
|
||||
throw new \Exception('Unable to parse dom because the http response was the empty string');
|
||||
}
|
||||
|
||||
return str_get_html(
|
||||
$html,
|
||||
$lowercase,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue