aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Eugene Molotov <eugene.molotov@yandex.ru> 2021-05-24 00:50:24 +0500
committerGravatar GitHub <noreply@github.com> 2021-05-24 00:50:24 +0500
commit63d257d9d02f934cda054a0beda7cbdb438d06b9 (patch)
treed1a9f3da6d62969c880161ca55ae0c710b3bdae0
parent37cd0714531607deda05c307fe3e6001d3e8df02 (diff)
downloadrss-bridge-63d257d9d02f934cda054a0beda7cbdb438d06b9.tar.gz
rss-bridge-63d257d9d02f934cda054a0beda7cbdb438d06b9.tar.zst
rss-bridge-63d257d9d02f934cda054a0beda7cbdb438d06b9.zip
[PikabuBridge] Cut "script" element from post body (#2125)
Also correct description and remove useless returnServerError call
-rw-r--r--bridges/PikabuBridge.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/bridges/PikabuBridge.php b/bridges/PikabuBridge.php
index 3d514ed0..17225758 100644
--- a/bridges/PikabuBridge.php
+++ b/bridges/PikabuBridge.php
@@ -3,7 +3,7 @@ class PikabuBridge extends BridgeAbstract {
const NAME = 'Пикабу';
const URI = 'https://pikabu.ru';
- const DESCRIPTION = 'Выводит посты по тегу';
+ const DESCRIPTION = 'Выводит посты по тегу, сообществу или пользователю';
const MAINTAINER = 'em92';
const PARAMETERS_FILTER = array(
@@ -75,7 +75,7 @@ class PikabuBridge extends BridgeAbstract {
public function collectData(){
$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);
$html = str_get_html($text_html);
@@ -87,6 +87,7 @@ class PikabuBridge extends BridgeAbstract {
$el_to_remove_selectors = array(
'.story__read-more',
+ 'script',
'svg.story-image__stretch',
);