Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7db4558d authored by asciimoo's avatar asciimoo
Browse files

[mod][fix] startpage engine updates

parent 6f86b96a
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -29,9 +29,12 @@ def response(resp):
    dom = html.fromstring(resp.content)
    # ads xpath //div[@id="results"]/div[@id="sponsored"]//div[@class="result"]
    # not ads: div[@class="result"] are the direct childs of div[@id="results"]
    for result in dom.xpath('//div[@id="results"]/div[@class="result"]'):
    for result in dom.xpath('//div[@class="result"]'):
        link = result.xpath('.//h3/a')[0]
        url = link.attrib.get('href')
        if url.startswith('http://www.google.')\
           or url.startswith('https://www.google.'):
            continue
        title = link.text_content()

        content = ''