๋ฐ์ํ
ํ์
์๋ ์ฝ๋๋ฅผ ์คํํ๋ ค๋๋ฐ ์ ํํ ๋ฉ์ธ์ง๋ ์ ๋จ๊ณ ์๊พธ HTTPError
๊ฐ ๋ฐ์ํ๋ค:
from langchain.utilities.duckduckgo_search import DuckDuckGoSearchAPIWrapper
def get_ticker(inputs):
ddg = DuckDuckGoSearchAPIWrapper()
company_name = inputs["company_name"]
return ddg.run(f"symbol of {company_name}")
get_ticker({"name":"Google"})
์ ์ฌํ ์๋ฌ ์ฌํญ์ ๋ค์๊ณผ ๊ฐ๋ค.
duckduckgo_search.py in _get_url(self, method, url, **kwargs)
80 )
81 if self._is_500_in_url(str(resp.url)) or resp.status_code == 202:
---> 82 raise httpx._exceptions.HTTPError("")
83 resp.raise_for_status()
84 if resp.status_code == 200:
HTTPError:
ํด๊ฒฐ ๋ฐฉ๋ฒ
DuckDuckGo ํจํค์ง(duckduckgo_search
)๊ฐ ์ค์น๋ ๋ฒ์ ์ ํ์ธํ์ 3.8.5 ๋ฒ์ ์์ ํ์ธํ๋ค.
ํด๋น ๋ฒ์ ์ ์ต์ ์ผ๋ก ์
๊ทธ๋ ์ด๋๋ฅผ ํ์ ์ค๋ฅ๊ฐ ๋ฐ์ํ์ง ์๋ ๊ฒ์ ํ์ธํ๋ค.
# ํ์ฌ ์ค์น๋ ๋ฒ์ ํ์ธ ๋ฐฉ๋ฒ
pip show duckduckgo_search
"""
Name: duckduckgo_search
Version: 3.8.3
Summary: Search for words, documents, images, news, maps and text translation using the DuckDuckGo.com search engine.
Home-page:
Author: deedy5
Author-email:
License: MIT License
Location:
Requires: click, lxml, primp
Required-by:
"""
# ๋ฒ์ ์
๊ทธ๋ ์ด๋ ๋ฐฉ๋ฒ
pip install -U duckduckgo_search
๋ฐ์ํ
'๐ป Back-End' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[Node] nvm exit status 5 error ํด๊ฒฐ ๋ฐฉ๋ฒ (0) | 2025.03.30 |
---|---|
[JEUS] ์ค์น ํ์ผ ์คํ ์ ์๋ฌ: ZeroGty: Windows DLL failed to load (0) | 2025.03.03 |
[Excel] Spring์์ ์์ ์ ์ถ๋ ฅํ๋ ๋ฐฉ๋ฒ (0) | 2020.11.24 |
[Spring Batch] Logback ์ค์ ํ๊ธฐ (0) | 2019.11.14 |
Telegram Bot API (0) | 2019.10.01 |