'Can't get the text of a xmp source code properly
I am trying to get the text of this line from the source code of a website.
<xmp:CreateDate>2020-12-31T10:59:31Z</xmp:CreateDate>
I tried this code
date = soup.select_one("#gif.borders") or ""
if date:
soup = BeautifulSoup(requests.get((soup.img["src"])).content, "html.parser")
date = soup.select_one('xmp:createdate')
print (date).text
but I kept getting ':createdate' pseudo-class is not implemented at this time error
so I removed ":createdate" leaving it with only date = soup.select_one('xmp:') but then it started returning date as "None". How can I take the text of the source code properly?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
