skip fake links
This commit is contained in:
parent
794a28398a
commit
1d88097ad6
|
@ -59,9 +59,12 @@ def get_images(soup, config):
|
||||||
# gallery item from a tag
|
# gallery item from a tag
|
||||||
all_a_tag = soup.find_all('a')
|
all_a_tag = soup.find_all('a')
|
||||||
for a_tag in all_a_tag:
|
for a_tag in all_a_tag:
|
||||||
a_href = a_tag['href']
|
try:
|
||||||
if upload_folder in a_href:
|
a_href = a_tag['href']
|
||||||
img_url_set.add(a_href)
|
if upload_folder in a_href:
|
||||||
|
img_url_set.add(a_href)
|
||||||
|
except KeyError:
|
||||||
|
continue
|
||||||
# external
|
# external
|
||||||
all_external_css = soup.find_all("link", {"rel": "stylesheet"})
|
all_external_css = soup.find_all("link", {"rel": "stylesheet"})
|
||||||
for css_file in all_external_css:
|
for css_file in all_external_css:
|
||||||
|
|
Loading…
Reference in New Issue