bcci commited on
Commit
6149ec1
·
verified ·
1 Parent(s): 0b3c590

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -19,7 +19,7 @@ def stealthy_scraper(url):
19
 
20
  def scraper(url):
21
  html = fetcher.get(url)
22
- return html.prettify()
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
- async def get_markdown_get(request: Request, url: str):
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)