-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
132 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -169,3 +169,4 @@ tmp2.md | |
.harmon_ai/README_template.md | ||
output | ||
urls.txt | ||
memo.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from duckduckgo_search import DDGS | ||
import json | ||
|
||
# クエリ | ||
with DDGS() as ddgs: | ||
results = list(ddgs.text( | ||
keywords='お好み焼き レシピ', # 検索ワード | ||
region='jp-jp', # リージョン 日本は"jp-jp",指定なしの場合は"wt-wt" | ||
safesearch='off', # セーフサーチOFF->"off",ON->"on",標準->"moderate" | ||
timelimit=None, # 期間指定 指定なし->None,過去1日->"d",過去1週間->"w", | ||
# 過去1か月->"m",過去1年->"y" | ||
max_results=4 # 取得件数 | ||
)) | ||
|
||
# レスポンスの表示 | ||
for line in results: | ||
print(json.dumps( | ||
line, | ||
indent=2, | ||
ensure_ascii=False | ||
)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters