Hello. I found this article: "
Declaring language in HTML" by w3.org.
They describe the following code to set language attributes:
Code:
<html lang="fr" xml:lang="fr" xmlns="http://www.w3.org/1999/xhtml">
I'm wondering if this is what I need to do with my recipe. Something like inserting the following code:
Code:
def postprocess_html(self, soup, first_fetch):
<html lang="fr" xml:lang="fr" xmlns="http://www.lemonde.fr/diplomatie/rss_full.xml">
<html lang="en" xml:lang="en" xmlns="http://www.project-syndicate.org/rss/politics">
<html lang="en" xml:lang="en" xmlns="http://www.postwesternworld.com/feed/">
#and so on for each source....
Is that what I need? Is that at least close to what I need to do?
Thanks
Edit:
I noticed that all recipes has "def" before postprocess_html, so I included it.
Moreover, many recipes include (self, soup, first_fetch) after postprocess_html, while others include (self, soup, first_fetch, job_info) or only (self, soup). I added to my code the first option (self, soup, first_fetch) since it is the most used, but I don't know if it's necessary.
Edit 2:
When I use the above code in Calibre recipe advanced settings, I get syntax error for the line with <html lang="fr" xml:lang="fr" xmlns="http://www.lemonde.fr/diplomatie/rss_full.xml">