-
-
Save TheCatPlusPlus/86ff05a1abcaacac5d96 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sibling = h5.nextSibling | |
skipped = [] | |
while isinstance(sibling, NavigableString) and sibling.strip() == u'': | |
skipped.append(sibling) | |
sibling = sibling.nextSibling | |
if ( | |
sibling is not None and not isinstance(sibling, NavigableString) and | |
sibling.name == u'p' and sibling.string is not None and | |
(u'photo:' in sibling.string.lower() or u'photo by' in sibling.string.lower()) | |
): |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment