mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-04-09 16:38:50 +00:00
[PikabuBridge] Cut "script" element from post body (#2125)
Also correct description and remove useless returnServerError call
This commit is contained in:
parent
37cd071453
commit
63d257d9d0
@ -3,7 +3,7 @@ class PikabuBridge extends BridgeAbstract {
|
|||||||
|
|
||||||
const NAME = 'Пикабу';
|
const NAME = 'Пикабу';
|
||||||
const URI = 'https://pikabu.ru';
|
const URI = 'https://pikabu.ru';
|
||||||
const DESCRIPTION = 'Выводит посты по тегу';
|
const DESCRIPTION = 'Выводит посты по тегу, сообществу или пользователю';
|
||||||
const MAINTAINER = 'em92';
|
const MAINTAINER = 'em92';
|
||||||
|
|
||||||
const PARAMETERS_FILTER = array(
|
const PARAMETERS_FILTER = array(
|
||||||
@ -75,7 +75,7 @@ class PikabuBridge extends BridgeAbstract {
|
|||||||
public function collectData(){
|
public function collectData(){
|
||||||
$link = $this->getURI();
|
$link = $this->getURI();
|
||||||
|
|
||||||
$text_html = getContents($link) or returnServerError('Could not fetch ' . $link);
|
$text_html = getContents($link);
|
||||||
$text_html = iconv('windows-1251', 'utf-8', $text_html);
|
$text_html = iconv('windows-1251', 'utf-8', $text_html);
|
||||||
$html = str_get_html($text_html);
|
$html = str_get_html($text_html);
|
||||||
|
|
||||||
@ -87,6 +87,7 @@ class PikabuBridge extends BridgeAbstract {
|
|||||||
|
|
||||||
$el_to_remove_selectors = array(
|
$el_to_remove_selectors = array(
|
||||||
'.story__read-more',
|
'.story__read-more',
|
||||||
|
'script',
|
||||||
'svg.story-image__stretch',
|
'svg.story-image__stretch',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user