Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -498,14 +498,14 @@ async def handle_user_input(websocket,key, process, connected,process_ids):
|
|
498 |
# Parse HTML content
|
499 |
soup = BeautifulSoup(response.text, "html.parser")
|
500 |
# Get base URL
|
501 |
-
base_url =
|
502 |
-
base_host = base_url.netloc.rstrip("/")
|
503 |
# Function to join relative URLs with base URL
|
504 |
def join_url_with_base(url):
|
505 |
if url.startswith('/'):
|
506 |
-
return
|
507 |
else:
|
508 |
-
return
|
509 |
|
510 |
# Find and modify CSS links
|
511 |
for link in soup.find_all("link", rel="stylesheet", href=True):
|
@@ -888,14 +888,14 @@ async def exe(websocket,connected,key,process_ids):
|
|
888 |
# Parse HTML content
|
889 |
soup = BeautifulSoup(response.text, "html.parser")
|
890 |
# Get base URL
|
891 |
-
base_url =
|
892 |
-
base_host = base_url.netloc.rstrip("/")
|
893 |
# Function to join relative URLs with base URL
|
894 |
def join_url_with_base(url):
|
895 |
if url.startswith('/'):
|
896 |
-
return
|
897 |
else:
|
898 |
-
return
|
899 |
|
900 |
# Find and modify CSS links
|
901 |
for link in soup.find_all("link", rel="stylesheet", href=True):
|
|
|
498 |
# Parse HTML content
|
499 |
soup = BeautifulSoup(response.text, "html.parser")
|
500 |
# Get base URL
|
501 |
+
base_url = url
|
502 |
+
# base_host = base_url.netloc.rstrip("/")
|
503 |
# Function to join relative URLs with base URL
|
504 |
def join_url_with_base(url):
|
505 |
if url.startswith('/'):
|
506 |
+
return base_url+url
|
507 |
else:
|
508 |
+
return url
|
509 |
|
510 |
# Find and modify CSS links
|
511 |
for link in soup.find_all("link", rel="stylesheet", href=True):
|
|
|
888 |
# Parse HTML content
|
889 |
soup = BeautifulSoup(response.text, "html.parser")
|
890 |
# Get base URL
|
891 |
+
base_url = url
|
892 |
+
# base_host = base_url.netloc.rstrip("/")
|
893 |
# Function to join relative URLs with base URL
|
894 |
def join_url_with_base(url):
|
895 |
if url.startswith('/'):
|
896 |
+
return base_url+url
|
897 |
else:
|
898 |
+
return url
|
899 |
|
900 |
# Find and modify CSS links
|
901 |
for link in soup.find_all("link", rel="stylesheet", href=True):
|