Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -19,7 +19,7 @@ def stealthy_scraper(url):
|
|
19 |
|
20 |
def scraper(url):
|
21 |
html = fetcher.get(url)
|
22 |
-
return html.
|
23 |
|
24 |
def convert_html_to_md(html):
|
25 |
with tempfile.NamedTemporaryFile(suffix=".html" ,delete=False) as temp_file:
|
@@ -52,7 +52,7 @@ async def get_markdown_get(request: Request, url: str):
|
|
52 |
|
53 |
# GET endpoint to /read/{url:path} expecting URL in path
|
54 |
@app.get("/reader/{url:path}", response_class=PlainTextResponse)
|
55 |
-
|
56 |
try:
|
57 |
# Retrieve the full path from the request
|
58 |
full_url = str(request.url)
|
|
|
19 |
|
20 |
def scraper(url):
|
21 |
html = fetcher.get(url)
|
22 |
+
return html.html_content
|
23 |
|
24 |
def convert_html_to_md(html):
|
25 |
with tempfile.NamedTemporaryFile(suffix=".html" ,delete=False) as temp_file:
|
|
|
52 |
|
53 |
# GET endpoint to /read/{url:path} expecting URL in path
|
54 |
@app.get("/reader/{url:path}", response_class=PlainTextResponse)
|
55 |
+
def get_markdown_get(request: Request, url: str):
|
56 |
try:
|
57 |
# Retrieve the full path from the request
|
58 |
full_url = str(request.url)
|