Created
June 30, 2011 13:09
-
-
Save acrymble/1056197 to your computer and use it in GitHub Desktop.
obo.py
This file contains hidden or 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
| # obo.py | |
| def stripTags(pageContents): | |
| startLoc = pageContents.find("<hr/><h2>") | |
| pageContents = pageContents[startLoc:] | |
| inside = 0 | |
| text = '' | |
| for char in pageContents: | |
| if char == '<': | |
| inside = 1 | |
| elif (inside == 1 and char == '>'): | |
| inside = 0 | |
| elif inside == 1: | |
| continue | |
| else: | |
| text += char | |
| return text |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment