Commit Graph

13 Commits

Author SHA1 Message Date
Eugene Molotov 43ad54dba0
[PikabuBridge] Skip sponsored posts (#2983)
* [PikabuBridge] Skip sponsored posts

Sponsored posts appear very rarely in html code.
But when they appear, they always have different url that results junk feed.

One of the example is [1]. After visiting it, you will be redirected to [2] that is marked as
"Партнёрский материал" in Russian, or "Sponsored post" in English.

[1] https://pikabu.ru/story/a_mla_posa_m_memu_seyla_otorathche_idomikhlenonoikhmyav_sseyla_otoratazoed__9388770?from=cpm
[2] https://pikabu.ru/story/kakim_dolzhen_byit_vash_noutbuk_9388770

* lint

Co-authored-by: Dag <me@dvikan.no>
2022-08-25 18:09:06 +02:00
Dag 4f75591060
Reformat codebase v4 (#2872)
Reformat code base to PSR12

Co-authored-by: rssbridge <noreply@github.com>
2022-07-01 15:10:30 +02:00
Eugene Molotov 716f5ddc0e [PikabuBridge] Do not strip strikethrough tags in body content 2021-07-24 00:39:00 +05:00
Eugene Molotov 0ee549f468 [PikabuBridge] Remove whitespace from fake news marker 2021-07-24 00:39:00 +05:00
Eugene Molotov 63d257d9d0
[PikabuBridge] Cut "script" element from post body (#2125)
Also correct description and remove useless returnServerError call
2021-05-24 00:50:24 +05:00
Eugene Molotov 0c8fabeb11
[PikabuBridge] Marking posts from "Как бы Новости" section, which are funny and deliberately fake (#2032) 2021-03-30 23:06:23 +05:00
Eugene Molotov 7f6ca23e8f [PikabuBridge] Preserve links (#1286)
* [PikabuBridge] Preserve links
2019-09-16 21:28:41 +02:00
Eugene Molotov b440a6fdc6 [PikabuBridge] Added filtering by user (#1266) 2019-08-28 16:29:49 +02:00
logmanoriginal 6c4098d655 Revert "all: Use ->remove() instead of ->outertext = ''"
This reverts commit 052844f5e1.

There is a bug in ->remove() that causes the parser to incorrectly
identify elements in the DOM tree that shouldn't exist anymore.

References #1151
2019-06-02 13:06:16 +02:00
Eugene Molotov 15c374e317 [PikabuBridge] More options and fixes (#1149)
* Add gif support
* Use page title as feed title
* Implement community support
2019-06-01 21:35:18 +02:00
logmanoriginal 052844f5e1 all: Use ->remove() instead of ->outertext = ''
simplehtmldom 1.9 introduced new functions to recursively remove
nodes from the DOM. This allows removing elements without the need
to re-load the document by using $html->load($html->save()), which
is very inefficient.

Find more information about remove() at
https://simplehtmldom.sourceforge.io/docs/1.9/api/simple_html_dom_node/remove/
2019-06-01 21:29:57 +02:00
logmanoriginal 392e3ff6c7 phpcs: Fix violations 2018-11-05 12:55:58 +01:00
Eugene Molotov 911bcfb246 [PikabuBridge] Implemented bridge (#830)
* [PikabuBridge] Implemented bridge
2018-09-13 12:52:26 +01:00