diff --git a/frontend/ui/wikipedia.lua b/frontend/ui/wikipedia.lua
index 989fee27b..ec3a19abb 100644
--- a/frontend/ui/wikipedia.lua
+++ b/frontend/ui/wikipedia.lua
@@ -58,6 +58,7 @@ local Wikipedia = {
prop = "text|sections|displaytitle|revid",
-- page = nil, -- text to lookup, will be added below
-- disabletoc = "", -- if we want to remove toc IN html
+ -- 20230722: there is no longer the TOC in the html no matter this param
disablelimitreport = "",
disableeditsection = "",
},
@@ -306,14 +307,15 @@ function Wikipedia:getFullPageImages(wiki_title, lang)
local wiki_base_url = self:getWikiServer(lang)
local thumbs = {} -- bits of HTML containing an image
- -- We first try to catch images in
, which should exclude
- -- wikipedia icons, flags... These seem to all end with a double
.
- for thtml in html:gmatch([[
%s*
]]) do
+ -- We first try to catch images in , which should exclude
+ -- wikipedia icons, flags...
+ -- (We want to match both typeof="mw:File/Thumb" and typeof="mw:File/Frame", so this [TF][hr][ua]m[be]...
+ for thtml in html:gmatch([[]*typeof="mw:File/[TF][hr][ua]m[be]"[^>]*>.-]]) do
table.insert(thumbs, thtml)
end
-- We then also try to catch images in galleries (which often are less
-- interesting than those in thumbinner) as a 2nd set.
- for thtml in html:gmatch([[