Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Handling anchors by ignoring them
  • Loading branch information
Greg Wilson committed Jul 8, 2016
1 parent 9d6512c commit 5520175
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/extract_figures.py
Expand Up @@ -69,7 +69,7 @@ def find_image_links(doc, result):

if ((doc['type'] == 'a') and ('attr' in doc) and ('href' in doc['attr'])) \
or \
((doc['type'] == 'html_element') and (doc['value'] == 'a')):
((doc['type'] == 'html_element') and (doc['value'] == 'a') and ('href' in doc['attr'])):
path = doc['attr']['href']
if os.path.splitext(path)[1].lower() in IMAGE_FILE_SUFFIX:
result.append({'alt':'', 'src': doc['attr']['href']})
Expand Down

0 comments on commit 5520175

Please sign in to comment.