bisohns / search-engine-parser

Lightweight package to query popular search engines and scrape for result titles, links and descriptions
https://search-engine-parser.readthedocs.io
459 stars 87 forks source link

SSL: CERTIFICATE_VERIFY_FAILED when using any search engine #158

Open valerino opened 2 years ago

valerino commented 2 years ago

Describe the bug

SSL: CERTIFICATE_VERIFY_FAILED when using any search engine.

To Reproduce Steps to reproduce the behavior:

  1. Open python console to
  2. Import search_engine_parser
  3. Search using i.e. duckduckgo Engine :
    eng = DuckDuckGoSearch()
    results = eng.search('something', page)
  4. See error
File "/home/valerino/work/test_search/test_searchengines.py", line 187, in search
    results = eng.search(entity, page)
  File "/home/valerino/.local/lib/python3.8/site-packages/search_engine_parser/core/base.py", line 284, in search
    soup = loop.run_until_complete(
  File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
    return future.result()
  File "/home/valerino/.local/lib/python3.8/site-packages/search_engine_parser/core/base.py", line 212, in get_soup
    html = await self.get_source(url, cache, proxy, proxy_auth)
  File "/home/valerino/.local/lib/python3.8/site-packages/search_engine_parser/core/base.py", line 194, in get_source
    raise Exception('ERROR: {}\n'.format(exc))
Exception: ERROR: Cannot connect to host www.duckduckgo.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1131)')]

Desktop (please complete the following information):

MeNsaaH commented 2 years ago

is this still reproducible? Seems to be your connection/tls setup