I'm trying to parse a numeric field using parsel. By default, the documentation shows how to extract text. And this:
from parsel import Selector
html = "<title>2</title>\n"
selector = Selector(text=html)
get_text = selector.css("title::text").get()
print(type(get_text))
Returns str. However,
print(selector.css("title::number").get())
gives the error
cssselect.xpath.ExpressionError: The pseudo-element ::number is unknown
Is there an easy way to extract numbers using parsel?
You can use lxml, because parcel conversion return
strresult.output: