mirror of
https://github.com/langgenius/dify-plugins.git
synced 2026-07-22 01:55:36 -04:00
baidu_search #232
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @cbangzan on GitHub (Aug 20, 2025).
Plugin Name
baidu_search
Function Description
import requests
from bs4 import BeautifulSoup
import urllib.parse
import time
import re
from urllib.robotparser import RobotFileParser
import json
class BaiduSearchCrawler:
def init(self):
self.headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36'
}
self.session = requests.Session()
self.session.headers.update(self.headers)
使用示例
if name == "main":
crawler = BaiduSearchCrawler()
keyword = input("请输入搜索关键词: ")
crawler.search_and_crawl(keyword)
Official Website URL
No response
@jingfelix commented on GitHub (Aug 31, 2025):
Hi, if you would like to submit new plugins to Dify Marketplace, please check https://docs.dify.ai/plugin-dev-en/0321-release-overview