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

Commit caeafff4 authored by Nivesh Krishna's avatar Nivesh Krishna
Browse files

fix erros reported on gitlab

parent 9e5edcb6
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@ def request(query, params):
    try:
        lang, region = params['language'].split('-')
    except:
        lang = 'en'
        region = 'us'
    if not params['engine_data'].get('next_page_token'):
        params['url'] = search_url.format(query=quote_plus(query), page=params['pageno'], region=region, lang=lang)
+5 −0
Original line number Diff line number Diff line
@@ -368,6 +368,9 @@ def proxify(url):

def image_proxify(url):

    if not isinstance(url, str):
        return None

    if url.startswith('//'):
        url = 'https:' + url

@@ -1008,6 +1011,8 @@ def image_proxy():
            max_redirects=20)

        resp = next(stream)
        if resp is None:
            return '', 400
        content_length = resp.headers.get('Content-Length')
        if content_length and content_length.isdigit() and int(content_length) > maximum_size:
            return 'Max size', 400