Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash after searx.google engine:result parse error in: <div class="g"/> #1543

Open
bertalanp99 opened this issue Mar 26, 2019 · 2 comments

Comments

2 participants
@bertalanp99
Copy link

commented Mar 26, 2019

I have the following error with my newborn searx instance: I search anything, then I get the error, searx seems to keep running, but when I press return on the console, it quits. This strangely does not happen after the first search, only the second.

Error (I suppose only the end counts):

DEBUG:urllib3.connectionpool:https://www.google.co.uk:443 "GET /search?q=deadbeef&start=0&gws_rd=cr&gbv=1&lr=lang_en&ei=x HTTP/1.1" 200 None
DEBUG:searx.google engine:result parse error in:
<div class="g">
  <div class="VBt9Dc hp-xpdbox">
    <div class="R8KuR" style="float:right">
      <div class="OSMzvb" style="height:64px;width:64px">
        <a href="/url?q=https://deadbeef.en.softonic.com/mac&amp;sa=U&amp;ved=0ahUKEwihsO7i86DhAhXNFTQIHZ3sCsMQndQBCEwwDg&amp;usg=AOvVaw3BXxQDqhY3Xaz1byYYlVAs">
          <img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRl4xWgml1gLgLTVet-ABq8JYW-mvc8VttdB61IefNuPRSYcpGa9FMc0dY" style="margin-left:0px;margin-right:0px" title="https://deadbeef.en.softoni
c.com/mac" alt="Image result for deadbeef"/>
        </a>
      </div>
    </div>
    <div class="V7Q8V">
      <div>
        <div class="FSP1Dd">DeaDBeeF</div>
        <div class="F7uZG Rlw09">Software</div>
      </div>
    </div>
    <div class="V7Q8V">
      <div class="mraOPb">
        <span>DeaDBeeF is an audio player software available for GNU+Linux, Android and other Unix-like operating systems. DeaDBeeF is free and open source software, except on Android. <a class="fl" href="/ur
l?q=https://en.wikipedia.org/wiki/DeaDBeeF&amp;sa=U&amp;ved=0ahUKEwihsO7i86DhAhXNFTQIHZ3sCsMQmhMIUigAMBA&amp;usg=AOvVaw2od6tHmu6xez0VrEn-7l09">Wikipedia</a></span>
      </div>
    </div>
    <div class="V7Q8V" style="display:none"/>
    <div class="V7Q8V">
     <span class="cC4Myd">Platforms: </span>                                                                                                                                                          [92/1947]
      <span class="A1t5ne"><a class="A1t5ne fl" href="/search?lr=lang_en&amp;gbv=1&amp;q=x86&amp;stick=H4sIAAAAAAAAAOPgE-LWT9c3NDJKNrOIL1bi0M_VN7Awz0jRUsgot9JPzs_JSU0uyczP0y_OTyspTyxKtSrISSxJyy_KXcTKXGFhBgARw
iYEQQAAAA&amp;sa=X&amp;ved=0ahUKEwihsO7i86DhAhXNFTQIHZ3sCsMQmxMIVigAMBI">x86</a>, <a class="A1t5ne fl" href="/search?lr=lang_en&amp;gbv=1&amp;q=x86-64&amp;stick=H4sIAAAAAAAAAOPgE-LWT9c3NDJKNrOIL1bi1M_VNzDMTsm
t1FLIKLfST87PyUlNLsnMz9Mvzk8rKU8sSrUqyEksScsvyl3EylZhYaZrZgIAMV0b9kUAAAA&amp;sa=X&amp;ved=0ahUKEwihsO7i86DhAhXNFTQIHZ3sCsMQmxMIVygBMBI">x86-64</a>, <a class="A1t5ne fl" href="/search?lr=lang_en&amp;gbv=1&amp;
q=ARM+architecture&amp;stick=H4sIAAAAAAAAAOPgE-LWT9c3NDJKNrOIL1bi0M_VN0hPqyrXUsgot9JPzs_JSU0uyczP0y_OTyspTyxKtSrISSxJyy_KXcQq4Bjkq5BYlJyRWQJUVFqUCgBmgrWsTgAAAA&amp;sa=X&amp;ved=0ahUKEwihsO7i86DhAhXNFTQIHZ3sCs
MQmxMIWCgCMBI">ARM architecture</a></span>
    </div>
    <div class="V7Q8V">
      <span class="cC4Myd">Written in: </span>
      <span class="A1t5ne"><a class="A1t5ne fl" href="/search?lr=lang_en&amp;gbv=1&amp;q=C+programming+language&amp;stick=H4sIAAAAAAAAAOPgE-LWT9c3NDJKNrOIL1bi0M_VNzAsMUvSUsoot9JPzs_JSU0uyczP0y_OTyspTyxKtSovyi
wpSc1TyMxbxCrmrFBQlJ9elJibm5mXrpCTmJdempieCgDWzFt3VgAAAA&amp;sa=X&amp;ved=0ahUKEwihsO7i86DhAhXNFTQIHZ3sCsMQmxMIWygAMBM">C</a>, <a class="A1t5ne fl" href="/search?lr=lang_en&amp;gbv=1&amp;q=C%2B%2B&amp;stick=H
4sIAAAAAAAAAOPgE-LWT9c3NDJKNrOIL1bi0M_VN8hKL0zXUsoot9JPzs_JSU0uyczP0y_OTyspTyxKtSovyiwpSc1TyMxbxMrsrK0NAC1TDPdDAAAA&amp;sa=X&amp;ved=0ahUKEwihsO7i86DhAhXNFTQIHZ3sCsMQmxMIXCgBMBM">C++</a>, <a class="A1t5ne fl"
 href="/search?lr=lang_en&amp;gbv=1&amp;q=Objective-C&amp;stick=H4sIAAAAAAAAAOPgE-LWT9c3NDJKNrOIL1bi0M_VNzAtNDbUUsoot9JPzs_JSU0uyczP0y_OTyspTyxKtSovyiwpSc1TyMxbxMrtn5QFki9L1XUGAJYoUhhLAAAA&amp;sa=X&amp;ved=0a
hUKEwihsO7i86DhAhXNFTQIHZ3sCsMQmxMIXSgCMBM">Objective-C</a>, <a class="A1t5ne fl" href="/search?lr=lang_en&amp;gbv=1&amp;q=Assembly+language&amp;stick=H4sIAAAAAAAAAOPgE-LWT9c3NDJKNrOIL1Zi18_VNyiwSNdSyii30k_Oz
8lJTS7JzM_TL85PKylPLEq1Ki_KLClJzVPIzFvEKuhYXJyam5RTqZCTmJdempieCgATDcAYUAAAAA&amp;sa=X&amp;ved=0ahUKEwihsO7i86DhAhXNFTQIHZ3sCsMQmxMIXigDMBM">Assembly language</a></span>
    </div>
    <div class="dXAUyb">
      <div class="lHETUb">People also search for</div>
      <div class="xKoZHf B27ELd" style="width:72px">
        <div class="tQOFN" style="height:72px">
          <a class="FEM55" href="/search?lr=lang_en&amp;gbv=1&amp;q=Amarok+(software)&amp;stick=H4sIAAAAAAAAAONgFuLWT9c3NDJKNrOIL1bi1M_VNzAxzjE01eJzzs_Nzc8LzkxJLU-sLF7EKuiYm1iUn62gUZyfVlKeWJSqCQD6ZsKMPgAAAA&a
mp;sa=X&amp;ved=0ahUKEwihsO7i86DhAhXNFTQIHZ3sCsMQsQ4IYjAU">
            <img alt="Amarok" height="49px" src="https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcR1_cNoVVbDmRDQZbR20zKPu54mjngBjK8YW4PyVSL8ppw6zvroIIOx" style="margin-top:11px" title="Amarok" width="72p
x"/>
          </a>
        </div>
        <div class="brYqc">
          <a class="fl" href="/search?lr=lang_en&amp;gbv=1&amp;q=Amarok+(software)&amp;stick=H4sIAAAAAAAAAONgFuLWT9c3NDJKNrOIL1bi1M_VNzAxzjE01eJzzs_Nzc8LzkxJLU-sLF7EKuiYm1iUn62gUZyfVlKeWJSqCQD6ZsKMPgAAAA&amp;
sa=X&amp;ved=0ahUKEwihsO7i86DhAhXNFTQIHZ3sCsMQxA0IYzAU" title="Amarok">Amarok</a>
          <div class="czonVc" title="Amarok"/>
        </div>
      </div>
      <div class="B27ELd" style="width:72px">
        <div class="tQOFN" style="height:72px">
          <a class="FEM55" href="/search?lr=lang_en&amp;gbv=1&amp;q=Audacious&amp;stick=H4sIAAAAAAAAAONgFuLWT9c3NDJKNrOIL1bi1M_VN7AsNs5K0uJzzs_Nzc8LzkxJLU-sLF7EyulYmpKYnJlfWgwALjR-VjYAAAA&amp;sa=X&amp;ved=0ah
UKEwihsO7i86DhAhXNFTQIHZ3sCsMQsQ4IZTAU">
            <img alt="Audacious" height="72px" src="https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcS981_WU1FZRUc1OnzFx9khTR8uvwXqd0Ea1CFbl9Jx1h_1mFWJZts" title="Audacious" width="72px"/>
          </a>
        </div>
        <div class="brYqc">
          <a class="fl" href="/search?lr=lang_en&amp;gbv=1&amp;q=Audacious&amp;stick=H4sIAAAAAAAAAONgFuLWT9c3NDJKNrOIL1bi1M_VN7AsNs5K0uJzzs_Nzc8LzkxJLU-sLF7EyulYmpKYnJlfWgwALjR-VjYAAAA&amp;sa=X&amp;ved=0ahUKE
wihsO7i86DhAhXNFTQIHZ3sCsMQxA0IZjAU" title="Audacious">Audacious</a>
          <div class="czonVc" title="Audacious"/>
        </div>
      </div>
      <div class="ty7XEe B27ELd" style="width:72px">
        <div class="tQOFN" style="height:72px">
          <a class="FEM55" href="/search?lr=lang_en&amp;gbv=1&amp;q=Clementine+(software)&amp;stick=H4sIAAAAAAAAAONgFuLWT9c3NDJKNrOIL1bi0s_VN0gptkxPydbic87Pzc3PC85MSS1PrCxexCrqnJOam5pXkpmXqqBRnJ9WUp5YlKoJAMRC
4c1DAAAA&amp;sa=X&amp;ved=0ahUKEwihsO7i86DhAhXNFTQIHZ3sCsMQsQ4IaDAU">
            <img alt="Clementine" height="48px" src="https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcQkZXy_m9XJTcrCeYzK3yn6xtUjIazK_TVJ3WYDXwTx09Me7kmxcQle" style="margin-top:12px" title="Cleme[43/1947]
dth="72px"/>
          </a>
        </div>
        <div class="brYqc">
          <a class="fl" href="/search?lr=lang_en&amp;gbv=1&amp;q=Clementine+(software)&amp;stick=H4sIAAAAAAAAAONgFuLWT9c3NDJKNrOIL1bi0s_VN0gptkxPydbic87Pzc3PC85MSS1PrCxexCrqnJOam5pXkpmXqqBRnJ9WUp5YlKoJAMRC4c1
DAAAA&amp;sa=X&amp;ved=0ahUKEwihsO7i86DhAhXNFTQIHZ3sCsMQxA0IaTAU" title="Clementine">Clementine</a>
          <div class="czonVc" title="Clementine"/>
        </div>
      </div>
      <br/>
      <div class="xKoZHf B27ELd" style="width:72px">
        <div class="tQOFN" style="height:72px">
          <a class="FEM55" href="/search?lr=lang_en&amp;gbv=1&amp;q=cmus&amp;stick=H4sIAAAAAAAAAONgFuLWT9c3NDJKNrOIL1bi1M_VN0gpyrLI0OJzzs_Nzc8LzkxJLU-sLF7EypKcW1oMAClo7pkxAAAA&amp;sa=X&amp;ved=0ahUKEwihsO7i86
DhAhXNFTQIHZ3sCsMQsQ4IazAU">
            <img alt="cmus" height="42px" src="https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcRAZbw9NNJThlcPyjjLWA8mXSgNZqXR5pkoFoTZujLMe0rXk5G9JiWC" style="margin-top:15px" title="cmus" width="72px"/>
          </a>
        </div>
        <div class="brYqc">
          <a class="fl" href="/search?lr=lang_en&amp;gbv=1&amp;q=cmus&amp;stick=H4sIAAAAAAAAAONgFuLWT9c3NDJKNrOIL1bi1M_VN0gpyrLI0OJzzs_Nzc8LzkxJLU-sLF7EypKcW1oMAClo7pkxAAAA&amp;sa=X&amp;ved=0ahUKEwihsO7i86DhA
hXNFTQIHZ3sCsMQxA0IbDAU" title="cmus">cmus</a>
          <div class="czonVc" title="cmus"/>
        </div>
      </div>
      <div class="B27ELd" style="width:72px">
        <div class="tQOFN" style="height:72px">
          <a class="FEM55" href="/search?lr=lang_en&amp;gbv=1&amp;q=Quod+Libet+(software)&amp;stick=H4sIAAAAAAAAAONgFuLWT9c3NDJKNrOIL1bi1M_VN0g2z6sw1OJzzs_Nzc8LzkxJLU-sLF7EKhpYmp-i4JOZlFqioFGcn1ZSnliUqgkAHCNy
IUIAAAA&amp;sa=X&amp;ved=0ahUKEwihsO7i86DhAhXNFTQIHZ3sCsMQsQ4IbjAU">
            <img alt="Quod Libet" height="52px" src="https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcSj44qVA9xkEy4DHXF1L4byn1VGBxsUZkU0Jx7l1NGRBTHyB37923A6" style="margin-top:10px" title="Quod Libet" wi
dth="72px"/>
          </a>
        </div>
        <div class="brYqc">
          <a class="fl" href="/search?lr=lang_en&amp;gbv=1&amp;q=Quod+Libet+(software)&amp;stick=H4sIAAAAAAAAAONgFuLWT9c3NDJKNrOIL1bi1M_VN0g2z6sw1OJzzs_Nzc8LzkxJLU-sLF7EKhpYmp-i4JOZlFqioFGcn1ZSnliUqgkAHCNyIUI
AAAA&amp;sa=X&amp;ved=0ahUKEwihsO7i86DhAhXNFTQIHZ3sCsMQxA0IbzAU" title="Quod Libet">Quod Libet</a>
          <div class="czonVc" title="Quod Libet"/>
        </div>
      </div>
      <div class="ty7XEe B27ELd" style="width:72px">
        <div class="tQOFN" style="height:72px">
          <a class="FEM55" href="/search?lr=lang_en&amp;gbv=1&amp;q=Rhythmbox&amp;stick=H4sIAAAAAAAAAONgFuLWT9c3NDJKNrOIL1bi1M_VNzA2Kjcu0eJzzs_Nzc8LzkxJLU-sLF7EyhmUUVmSkZuUXwEAafmgbDYAAAA&amp;sa=X&amp;ved=0ah
UKEwihsO7i86DhAhXNFTQIHZ3sCsMQsQ4IcTAU">
            <img alt="Rhythmbox" height="72px" src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSW3CP4yDUwYExlI4TCLBu45-2F0KcGbydJSd2EmFrE7jzmZddf018" title="Rhythmbox" width="72px"/>
          </a>
        </div>
        <div class="brYqc">
          <a class="fl" href="/search?lr=lang_en&amp;gbv=1&amp;q=Rhythmbox&amp;stick=H4sIAAAAAAAAAONgFuLWT9c3NDJKNrOIL1bi1M_VNzA2Kjcu0eJzzs_Nzc8LzkxJLU-sLF7EyhmUUVmSkZuUXwEAafmgbDYAAAA&amp;sa=X&amp;ved=0ahUKE
wihsO7i86DhAhXNFTQIHZ3sCsMQxA0IcjAU" title="Rhythmbox">Rhythmbox</a>
          <div class="czonVc" title="Rhythmbox"/>
        </div>
      </div>
      <br/>
    </div>
  </div>
</div>

DEBUG:searx.google engine:result parse error in:
<div class="g">
  <div id="k2fPW">
    <div class="u6RhQc">
      <div>
        <div class="CB9G1b">See results about</div>
      </div>
    </div>
    <div class="u6RhQc">
      <div class="TyXs8d">
        <table class="NWncrd">
          <tr>
            <td class="rNjNwd">
              <a class="fl" href="/search?lr=lang_en&amp;gbv=1&amp;q=Hexspeak&amp;stick=H4sIAAAAAAAAAONgecSYwS3w8sc9Yan4SWtOXmOM5OIKzsgvd80rySypFFLjYoOyZLh4pTj1c_UNjMxz4400GKS4uRBcJWUj_l2Xpp1j4xS8IykSGhDn6_Bo
decqViYDhqZ9Kw6xsXAwCjDwLGLl8EitKC5ITcwGAHiSqgl4AAAA&amp;sa=X&amp;ved=0ahUKEwihsO7i86DhAhXNFTQIHZ3sCsMQ-DIIejAW">
                <div class="JYQZge vrQIef">Hexspeak</div>
                <div class="C6ZAab">Hexspeak, like leetspeak, is a novelty form of variant English spelling using ...</div>
              </a>
            </td>
            <td width="40">
              <a href="/search?lr=lang_en&amp;gbv=1&amp;q=Hexspeak&amp;stick=H4sIAAAAAAAAAONgecSYwS3w8sc9Yan4SWtOXmOM5OIKzsgvd80rySypFFLjYoOyZLh4pTj1c_UNjMxz4400GKS4uRBcJWUj_l2Xpp1j4xS8IykSGhDn6_BodecqViYDhqZ
9Kw6xsXAwCjDwLGLl8EitKC5ITcwGAHiSqgl4AAAA&amp;sa=X&amp;ved=0ahUKEwihsO7i86DhAhXNFTQIHZ3sCsMQ-DIIezAW">
                <img class="DBHfJe" src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRekdctXKwLsQ1Ez9PPgD39rKltqD36t6qEprSkySB2c8RqwtWH_UNylPqhw4fjRiXhszQ" height="40" width="40"/>
              </a>
            </td>
          </tr>
        </table>
      </div>
    </div>
  </div>
</div>

DEBUG:searx.google engine:result parse error in:
<div class="g"/>

My minimal configuration:

general:
    debug : True
    instance_name : "searx"

search:
    safe_search : 0
    autocomplete : ""
    language : "en-US"

server:
    port : 8888
    bind_address : "127.1.7.1"
    secret_key : "secret"
    base_url : False
    image_proxy : False
    http_protocol_version : "1.1"

ui:
    static_path : ""
    templates_path : "" 
    default_theme : oscar
    default_locale : ""

outgoing:
    request_timeout : 2.0
    useragent_suffix : ""
    pool_connections : 100
    pool_maxsize : 10

engines:
  - name : google
    engine : google
    shortcut : go

  - name: bing
    engine: bing
    shortcut: bi

locales:
    en : English

doi_resolvers :
  oadoi.org : 'https://oadoi.org/'
  doi.org : 'https://doi.org/'
  doai.io  : 'http://doai.io/'

default_doi_resolver : 'oadoi.org'

Thank you

(This is on FreeBSD 12.0-RELEASE on arm64 (Raspberry Pi 3B+))

@dalf

This comment has been minimized.

Copy link
Collaborator

commented Apr 9, 2019

You can safely ignore these errors. The PR #1386 fixes some cases but not all ("city weather").

If you want to remove the logs, delete this line : https://github.com/asciimoo/searx/blob/master/searx/engines/google.py#L282

@dalf dalf added bug engine labels Apr 9, 2019

@dalf dalf added this to Engine requests in Engines via automation Apr 9, 2019

@dalf dalf moved this from Engine requests to Existing engines to fix in Engines Apr 9, 2019

@bertalanp99

This comment has been minimized.

Copy link
Author

commented Apr 17, 2019

Then maybe the crashes I am experiencing are unrelated to the error message.

It seems that searx crashes every time I issue a second search. The first search always works fine, but when I try the second, I get no results in the browser and searx silently dies (without any error). Should I open a new issue about this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.