SearX Robot

This revision is from 2024/08/07 16:06. You can Restore it.

Command:

wget -qO- "http://localhost/searxng/search?q=test&category_general=&language=auto&time_range=&safesearch=0&theme=simple"

curl "http://localhost/searxng/search?q=test&category_general=&language=auto&time_range=&safesearch=0&theme=simple"

Build the cache from the keyword dataset

import json

import subprocess

# Path to dataset JSON file

json_file_path = 'path_to_your_json_file.json'

# Read the JSON file

with open(json_file_path, 'r') as file:

data = json.load(file)

# Iterate through the JSON data to extract keywords

for item in data:

keyword = item['keyphrase']

# Construct the wget command

wget_command = f'wget -qO- "http://localhost/searxng/search?q={keyword}&category_general=&language=auto&time_range=&safesearch=0&theme=simple"'

# Execute the wget command

subprocess.run(wget_command, shell=True)

  

📝 📜 ⏱️ ⬆️