Skip to content

Commit

Permalink
Merge pull request #120 from sknebel-forks/fix-116
Browse files Browse the repository at this point in the history
add parsing for iframe.u-*[src] and tests (fix #116)
  • Loading branch information
kartikprabhu authored Jul 24, 2018
2 parents 769bd2a + f509758 commit 6de0025
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion mf2py/parse_property.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def url(el, dict_class, img_with_alt, base_url=''):
if prop_value is not None:
return prop_value
if prop_value is None:
prop_value = get_attr(el, "src", check_name=("audio", "video", "source"))
prop_value = get_attr(el, "src", check_name=("audio", "video", "source", "iframe"))
if prop_value is None:
prop_value = get_attr(el, "poster", check_name="video")
if prop_value is None:
Expand Down
8 changes: 8 additions & 0 deletions test/examples/test_src_equiv.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,13 @@ <h1 class="p-name">David</h1>
<video controls>
<source src="http://example.org/" class="u-x-example" />
</video>
</div>

<div class="h-card">
<h1 class="p-name">David</h1>
<iframe src="http://example.org/" class="u-x-example">
<p>Your browser does not support iframes.</p>
</iframe>
</div>
</body>
</html>

0 comments on commit 6de0025

Please sign in to comment.