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

Commit e3df22b1 authored by Adam Tauber's avatar Adam Tauber
Browse files

[fix] handle missing url scheme - fixes #428

parent 23dab175
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -53,6 +53,8 @@ def response(resp):
    # parse results
    for result in dom.xpath(results_xpath):
        url = result.xpath(url_xpath)[0].text
        if not url.startswith('http://') and not url.startswith('https://'):
            url = 'http://' + url
        title = result.xpath(title_xpath)[0].text
        content = escape(result.xpath(content_xpath)[0].text)