Hi.
My fix for YT parse, Example: https://www.youtube.com/feeds/videos.xml?playlist_id=PLF19E320AA1BEC135
-73,7 +73,17 is for other site. I have now no example.
`diff --git a/feedparser.lua b/feedparser.lua
index 2d66b8c..26224bc 100644
--- a/feedparser.lua
+++ b/feedparser.lua
@@ -73,7 +73,17 @@ local function parse_entries(entries_el, format_str, base)
--content
elseif (format_str=='atom' and tag=='content') or
(format_str=='rss' and (tag=='body' or tag=='xhtml:body' or tag == 'fullitem' or tag=='content:encoded')) then
-
entry.content=el:getText()
-
entry.content=el:getText()
-
if el.lom and el.lom[2] and el.lom[2][2] and el.lom[2][2][2].attr and el.lom[2][2][2].attr.src then
-
local img = el.lom[2][2][2].attr.src
-
if img:match ('(http.-%.jpg)') or img:match ('(http.-%.jpeg)') then
-
tinsert(entry.enclosures, {
-
-
-
-
-
-
end
--TODO: content_detail
--published
@@ -111,7 +121,20 @@ local function parse_entries(entries_el, format_str, base)
}
local author_url = (el:getChild('url') or blanky):getText()
if author_url and author_url ~= "" then entry.author_detail.href=resolve(author_url, rebase(el:getChild('url'), el_base)) end
-
elseif format_str =='atom' and tag=='media:group' then
-
local el_thumb = el:getChild('media:thumbnail')
-
-
local img = el_thumb:getAttr('url')
-
tinsert(entry.enclosures, {
-
-
-
-
-
-
if not entry.summary then
-
entry.summary=el:getText()
-
-
elseif tag=='category' or tag=='dc:subject' then
--todo
@@ -317,7 +340,7 @@ local function parse_rss(root, base_uri)
--image
elseif tag=='image' or tag=='rdf:image' then
feed.image={
-
title=el:getChild('title'):getText(),
-
title=(el:getChild('title') or blanky):getText(),
link=(el:getChild('link') or blanky):getText(),
width=(el:getChild('width') or blanky):getText(),
height=(el:getChild('height') or blanky):getText()
@@ -366,4 +389,4 @@ if _VERSION:sub(-3) < "5.3" then
end
-return feedparser
\ No newline at end of file
+return feedparser
`
Hi.
My fix for YT parse, Example: https://www.youtube.com/feeds/videos.xml?playlist_id=PLF19E320AA1BEC135
-73,7 +73,17 is for other site. I have now no example.
`diff --git a/feedparser.lua b/feedparser.lua
index 2d66b8c..26224bc 100644
--- a/feedparser.lua
+++ b/feedparser.lua
@@ -73,7 +73,17 @@ local function parse_entries(entries_el, format_str, base)
--content
elseif (format_str=='atom' and tag=='content') or
(format_str=='rss' and (tag=='body' or tag=='xhtml:body' or tag == 'fullitem' or tag=='content:encoded')) then
@@ -111,7 +121,20 @@ local function parse_entries(entries_el, format_str, base)
}
local author_url = (el:getChild('url') or blanky):getText()
if author_url and author_url ~= "" then entry.author_detail.href=resolve(author_url, rebase(el:getChild('url'), el_base)) end
@@ -317,7 +340,7 @@ local function parse_rss(root, base_uri)
--image
elseif tag=='image' or tag=='rdf:image' then
feed.image={
@@ -366,4 +389,4 @@ if _VERSION:sub(-3) < "5.3" then
end
-return feedparser
\ No newline at end of file
+return feedparser
`