mirror of
https://github.com/ai-robots-txt/ai.robots.txt.git
synced 2026-09-20 23:14:05 +02:00
\robots.py
This commit is contained in:
parent
101d7ac0ad
commit
78fd7b49d8
1 changed files with 1 additions and 7 deletions
|
|
@ -10,13 +10,7 @@ from pathlib import Path
|
|||
|
||||
def load_robots_json():
|
||||
"""Load the robots.json contents into a dictionary."""
|
||||
bots = json.loads(Path("./robots.json").read_text(encoding="utf-8"))
|
||||
for ro in bots:
|
||||
if "description" in ro:
|
||||
# urls in the json have "agents" twice, so let's tidy that up here...
|
||||
ro["description"] = ro["description"].replace('https://darkvisitors.com/agents/agents/', 'https://darkvisitors.com/agents/')
|
||||
return bots
|
||||
|
||||
return json.loads(Path("./robots.json").read_text(encoding="utf-8"))
|
||||
|
||||
def get_agent_soup():
|
||||
"""Retrieve current known agents from darkvisitors.com"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue