1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-20 23:31:37 +02:00

[XPathAbstract] Refactor xpath abstract (#4047)

* refactor XPathAbstract, keep all functionality intact

* fix linter errors

* further simplify code

* set default value for raw item content to true, avoiding escaping of html tags in feed item contents by default
This commit is contained in:
Niehztog
2024-04-02 23:14:25 +02:00
committed by GitHub
parent 8f962383c2
commit fb66775ece
2 changed files with 50 additions and 83 deletions

View File

@@ -37,7 +37,7 @@ class BlizzardNewsBridge extends XPathAbstract
const XPATH_EXPRESSION_ITEM = '/html/body/div/div[4]/div[2]/div[2]/div/div/section/ol/li/article';
const XPATH_EXPRESSION_ITEM_TITLE = './/div/div[2]/h2';
const XPATH_EXPRESSION_ITEM_CONTENT = './/div[@class="ArticleListItem-description"]/div[@class="h6"]';
const XPATH_EXPRESSION_ITEM_CONTENT = './/div[@class="ArticleListItem-description"]/div[@class="h6"]/text()';
const XPATH_EXPRESSION_ITEM_URI = './/a[@class="ArticleLink ArticleLink"]/@href';
const XPATH_EXPRESSION_ITEM_AUTHOR = '';
const XPATH_EXPRESSION_ITEM_TIMESTAMP = './/time[@class="ArticleListItem-footerTimestamp"]/@timestamp';