From 982e342043cd71589e8814e4b1a549b8816b4d2f Mon Sep 17 00:00:00 2001 From: Mark Bailey Date: Sun, 26 Jan 2025 15:35:03 -0500 Subject: [PATCH] feat: v2.1.1 * add frontmatter * remove testing __name__ == "__main__" statement --- scrape.py | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/scrape.py b/scrape.py index 7abb226..3f48eae 100644 --- a/scrape.py +++ b/scrape.py @@ -1,3 +1,15 @@ +""" +title: Web Scraper +author: Mark Bailey +author_url: https://git.markbailey.dev/cerbervs +git_url: https://git.markbailey.dev/cerbervs/scrape.git +description: Scrapes web with option for recursive scraping. +required_open_webui_version: any +requirements: json, websocket, requests, urllib, bs4, pydantic +version: 2.1.1 +licence: MIT +""" + import json import websocket import requests @@ -178,12 +190,3 @@ class Tools: scraper = None return json_s - - -if __name__ == "__main__": - tools = Tools() - print( - tools.scrape_recursively( - "https://www.allrecipes.com/recipe/16700/salsa-chicken/" - ) - )