For wordpress skip all images provided by a plugin.

This commit is contained in:
Hartmut Goebel
2019-03-30 23:53:09 +01:00
parent d2e57bbc27
commit e6a16dbe55

View File

@ -123,6 +123,7 @@ def collect_images(entry, generator=None):
e["href"] not in urls): e["href"] not in urls):
urls.append(e["href"]) urls.append(e["href"])
if generator == "wordpress": if generator == "wordpress":
urls = (u for u in urls if not "/wp-content/plugins/" in u)
# Work around a wordpress bug: If the filename contains an # Work around a wordpress bug: If the filename contains an
# umlaut, this will not be encoded using %-escape, as the # umlaut, this will not be encoded using %-escape, as the
# standard demands. This will break encoding in http.request() # standard demands. This will break encoding in http.request()