99 dom = html.fromstring(data)
101 for item
in eval_xpath_list(dom,
"//ul[contains(@class, 'lst_total')]/li[contains(@class, 'bx')]"):
104 thumbnail = eval_xpath_getindex(item,
".//div[contains(@class, 'thumb_single')]//img/@data-lazysrc", 0)
105 except (ValueError, TypeError, SearxEngineXPathException):
110 title=extract_text(eval_xpath(item,
".//a[contains(@class, 'link_tit')]")),
111 url=eval_xpath_getindex(item,
".//a[contains(@class, 'link_tit')]/@href", 0),
112 content=extract_text(
113 eval_xpath(item,
".//div[contains(@class, 'total_dsc_wrap')]//a[contains(@class, 'api_txt_lines')]")
148 dom = html.fromstring(data)
150 for item
in eval_xpath_list(
151 dom,
"//div[contains(@class, 'sds-comps-base-layout') and contains(@class, 'sds-comps-full-layout')]"
153 title = extract_text(eval_xpath(item,
".//span[contains(@class, 'sds-comps-text-type-headline1')]/text()"))
155 url = eval_xpath_getindex(item,
".//a[@href and @nocr='1']/@href", 0)
157 content = extract_text(eval_xpath(item,
".//span[contains(@class, 'sds-comps-text-type-body1')]"))
161 thumbnail = eval_xpath_getindex(
163 ".//div[contains(@class, 'sds-comps-image') and contains(@class, 'sds-rego-thumb-overlay')]//img[@src]/@src",
166 except (ValueError, TypeError, SearxEngineXPathException):
169 if title
and content
and url:
185 dom = html.fromstring(data)
187 for item
in eval_xpath_list(dom,
"//li[contains(@class, 'video_item')]"):
190 thumbnail = eval_xpath_getindex(item,
".//img[contains(@class, 'thumb')]/@src", 0)
191 except (ValueError, TypeError, SearxEngineXPathException):
196 length = parse_duration_string(extract_text(eval_xpath(item,
".//span[contains(@class, 'time')]")))
197 except (ValueError, TypeError):
202 "template":
"videos.html",
203 "title": extract_text(eval_xpath(item,
".//a[contains(@class, 'info_title')]")),
204 "url": eval_xpath_getindex(item,
".//a[contains(@class, 'info_title')]/@href", 0),
205 "thumbnail": thumbnail,