mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-07-02 03:05:25 -04:00
Fix XPath context for tags (#4246)
#fix https://github.com/FreshRSS/FreshRSS/issues/4245 Follow-up of https://github.com/FreshRSS/FreshRSS/pull/4220
This commit is contained in:
committed by
GitHub
parent
467ca9d0de
commit
fd945ffb93
@@ -2,6 +2,9 @@
|
||||
|
||||
## 2022-0X-XX FreshRSS 1.20.0-dev
|
||||
|
||||
* Features
|
||||
* New Web scraping feature *HTML+XPath* for Web pages without any RSS/ATOM feed [#4220](https://github.com/FreshRSS/FreshRSS/pull/4220)
|
||||
|
||||
|
||||
## 2022-02-04 FreshRSS 1.19.2
|
||||
|
||||
|
||||
@@ -605,7 +605,7 @@ class FreshRSS_Feed extends Minz_Model {
|
||||
$item['timestamp'] = $xPathItemTimestamp == '' ? '' : @$xpath->evaluate('normalize-space(' . $xPathItemTimestamp . ')', $node);
|
||||
$item['thumbnail'] = $xPathItemThumbnail == '' ? '' : @$xpath->evaluate('normalize-space(' . $xPathItemThumbnail . ')', $node);
|
||||
if ($xPathItemCategories != '') {
|
||||
$itemCategories = @$xpath->query($xPathItemCategories);
|
||||
$itemCategories = @$xpath->query($xPathItemCategories, $node);
|
||||
if ($itemCategories) {
|
||||
foreach ($itemCategories as $itemCategory) {
|
||||
$item['categories'][] = $itemCategory->textContent;
|
||||
|
||||
@@ -16,7 +16,7 @@ ENGINE = INNODB;
|
||||
CREATE TABLE IF NOT EXISTS `_feed` (
|
||||
`id` SMALLINT NOT NULL AUTO_INCREMENT, -- v0.7
|
||||
`url` VARCHAR(511) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
|
||||
`kind` SMALLINT DEFAULT 0, -- 0.20.0
|
||||
`kind` SMALLINT DEFAULT 0, -- 1.20.0
|
||||
`category` SMALLINT DEFAULT 0, -- v0.7
|
||||
`name` VARCHAR(191) NOT NULL,
|
||||
`website` VARCHAR(255) CHARACTER SET latin1 COLLATE latin1_bin,
|
||||
|
||||
@@ -13,7 +13,7 @@ CREATE TABLE IF NOT EXISTS `_category` (
|
||||
CREATE TABLE IF NOT EXISTS `_feed` (
|
||||
"id" SERIAL PRIMARY KEY,
|
||||
"url" VARCHAR(511) UNIQUE NOT NULL,
|
||||
"kind" SMALLINT DEFAULT 0, -- 0.20.0
|
||||
"kind" SMALLINT DEFAULT 0, -- 1.20.0
|
||||
"category" SMALLINT DEFAULT 0,
|
||||
"name" VARCHAR(255) NOT NULL,
|
||||
"website" VARCHAR(255),
|
||||
|
||||
@@ -14,7 +14,7 @@ CREATE TABLE IF NOT EXISTS `category` (
|
||||
CREATE TABLE IF NOT EXISTS `feed` (
|
||||
`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
|
||||
`url` VARCHAR(511) NOT NULL,
|
||||
`kind` SMALLINT DEFAULT 0, -- 0.20.0
|
||||
`kind` SMALLINT DEFAULT 0, -- 1.20.0
|
||||
`category` SMALLINT DEFAULT 0,
|
||||
`name` VARCHAR(255) NOT NULL,
|
||||
`website` VARCHAR(255),
|
||||
|
||||
Reference in New Issue
Block a user