Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -500,12 +500,19 @@ async def handle_user_input(websocket,key, process, connected,process_ids):
|
|
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(
|
505 |
-
if
|
506 |
-
|
|
|
|
|
|
|
|
|
|
|
507 |
else:
|
508 |
-
|
|
|
509 |
|
510 |
# Find and modify CSS links
|
511 |
for link in soup.find_all("link", rel="stylesheet", href=True):
|
@@ -890,12 +897,19 @@ async def exe(websocket,connected,key,process_ids):
|
|
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(
|
895 |
-
if
|
896 |
-
|
|
|
|
|
|
|
|
|
|
|
897 |
else:
|
898 |
-
|
|
|
899 |
|
900 |
# Find and modify CSS links
|
901 |
for link in soup.find_all("link", rel="stylesheet", href=True):
|
|
|
500 |
# Get base URL
|
501 |
base_url = url
|
502 |
# base_host = base_url.netloc.rstrip("/")
|
503 |
+
|
504 |
# Function to join relative URLs with base URL
|
505 |
+
def join_url_with_base(url_arg):
|
506 |
+
if url_arg.startswith('/'):
|
507 |
+
# print(url+url_arg)
|
508 |
+
return url+url_arg
|
509 |
+
elif url_arg.startswith('http'):
|
510 |
+
# print(here)
|
511 |
+
# print(url_arg)
|
512 |
+
return url_arg
|
513 |
else:
|
514 |
+
# print(url_arg)
|
515 |
+
return url+url_arg
|
516 |
|
517 |
# Find and modify CSS links
|
518 |
for link in soup.find_all("link", rel="stylesheet", href=True):
|
|
|
897 |
# Get base URL
|
898 |
base_url = url
|
899 |
# base_host = base_url.netloc.rstrip("/")
|
900 |
+
|
901 |
# Function to join relative URLs with base URL
|
902 |
+
def join_url_with_base(url_arg):
|
903 |
+
if url_arg.startswith('/'):
|
904 |
+
# print(url+url_arg)
|
905 |
+
return url+url_arg
|
906 |
+
elif url_arg.startswith('http'):
|
907 |
+
# print(here)
|
908 |
+
# print(url_arg)
|
909 |
+
return url_arg
|
910 |
else:
|
911 |
+
# print(url_arg)
|
912 |
+
return url+url_arg
|
913 |
|
914 |
# Find and modify CSS links
|
915 |
for link in soup.find_all("link", rel="stylesheet", href=True):
|