Skip to content

Commit a8907cf

Browse files
committed
refactoring of the code
1 parent 5fb614a commit a8907cf

File tree

3 files changed

+0
-6
lines changed

3 files changed

+0
-6
lines changed

.DS_Store

-6 KB
Binary file not shown.

getter.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
import requests
22
from bs4 import BeautifulSoup
33

4-
54
HEADERS = {'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36',
65
'Accept-Language': 'en-US'}
76

8-
97
def get_function(link:str, param = HEADERS) -> str:
108
"""
119
It sends a GET request to the specified link with optional headers.
@@ -20,9 +18,6 @@ def get_function(link:str, param = HEADERS) -> str:
2018
response = requests.get(url=link, headers=HEADERS)
2119
return str(response.content)
2220

23-
24-
25-
2621
def scraper(link: str, max_char: int) -> str:
2722
"""
2823
Scrapes the HTML text and removes unwanted elements, text, and comments.

pydantic_class.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
from langchain_core.pydantic_v1 import BaseModel, Field
32

43
class Response(BaseModel):

0 commit comments

Comments
 (0)