-
Notifications
You must be signed in to change notification settings - Fork 4
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
lilingfengdev
committed
Jun 10, 2024
1 parent
99068f5
commit c4bb381
Showing
2 changed files
with
23 additions
and
16 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 |
---|---|---|
@@ -1,21 +1,22 @@ | ||
from plugin.engine.bing import Bing | ||
from plugin.utils.translate import translate,EN | ||
from plugin.utils.translate import translate, EN | ||
|
||
print("欢迎使用插件搜索工具") | ||
keyword = input("请输入关键字:") | ||
|
||
engine = Bing() | ||
|
||
for result in engine.search(f"我的世界 {translate(keyword)} 插件"): | ||
def print_result(result): | ||
print(result.title) | ||
print(result.summary) | ||
print(result.url) | ||
print("====================") | ||
print() | ||
|
||
for result in engine.search(f"minecraft {translate(keyword,EN)} plugin"): | ||
print(translate(result.title)) | ||
print(translate(result.summary)) | ||
print(result.url) | ||
print("====================") | ||
print() | ||
|
||
print("欢迎使用插件搜索工具") | ||
while True: | ||
keyword = input("请输入关键字(exit退出):") | ||
if keyword == "exit": | ||
break | ||
|
||
engine = Bing() | ||
|
||
for result in engine.search(keyword): | ||
print_result(result) |
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