def get_ld_speakebale(name, theme_xpath, info_xpath, url): data = { "@context": "https://schema.org/", "@type": "WebPage", "name": name, "speakable": { "@type": "SpeakableSpecification", "xPath": [ theme_xpath, info_xpath ] }, "url": url } return data #