Python scraper based on AI
Python ai-crawlerai-scrapingai-searchcrawlerdata-extractionfirecrawl-alternativelarge-language-modelllmmarkdownragscrapingscraping-pythonweb-crawlerweb-crawlersweb-dataweb-data-extractionweb-scraperweb-scrapingweb-searchwebscraping
refactoring of the code
DPendea8907cf53a92
diff --git a/.DS_Store b/.DS_Storedeleted file mode 100644index 84b03a0d..00000000Binary files a/.DS_Store and /dev/null differdiff --git a/getter.py b/getter.pyindex 497e6ce0..e499621f 100644--- a/getter.py+++ b/getter.py@@ -1,11 +1,9 @@import requestsfrom bs4 import BeautifulSoup-HEADERS = {'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36','Accept-Language': 'en-US'}-def get_function(link:str, param = HEADERS) -> str:"""It sends a GET request to the specified link with optional headers.@@ -20,9 +18,6 @@ def get_function(link:str, param = HEADERS) -> str:response = requests.get(url=link, headers=HEADERS)return str(response.content)---def scraper(link: str, max_char: int) -> str:"""Scrapes the HTML text and removes unwanted elements, text, and comments.diff --git a/pydantic_class.py b/pydantic_class.pyindex e6172250..459f837f 100644--- a/pydantic_class.py+++ b/pydantic_class.py@@ -1,4 +1,3 @@-from langchain_core.pydantic_v1 import BaseModel, Fieldclass Response(BaseModel):