Unexpectedly renaming field in file

lxml is lxml’s HTML parser and lxml-xml and xml are lxml’s XML parser. (Refer this answer which points to this documentation)

So, instead of using lxml parser, you should use lxml-xml or xml parser.

import requests
from bs4 import BeautifulSoup
res = requests.get("https://itch.io/feed/sales.xml")
soup = BeautifulSoup(res.text, 'lxml-xml')

Output: https://itch.io/s/38593/halloween-event-sale

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top