Skip to content

Tag: html-parsing

How to read URIs from RDFLib using Python?

I have several thousands URIRef ontology values that I’m trying to get a string representation of: I could go to each one’s link individually (eg http://purl.obolibrary.org/obo/RO_0002219) and get it (e.g surrounded by), but how can I do it with Python? There are 2 ways that I see how to do it but…

Python regex to extract html paragraph

I’m trying to extract parapgraphs from HTML by using the following line of code: but it returns none even though I know there is. Why? Answer Why don’t use an HTML parser to, well, parse HTML. Example using BeautifulSoup: Note that text=True helps to filter out empty paragraphs.