Ramesh-vani commited on
Commit
bad5f22
·
verified ·
1 Parent(s): 1892803

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -11
app.py CHANGED
@@ -576,18 +576,15 @@ async def handle_user_input(websocket,key, process, connected,process_ids):
576
  print("No <body> tag found in the HTML")
577
 
578
  # Inline CSS and JavaScript
579
- soup = inline_resources(soup, url)
580
 
581
  response_data = {
582
  "type": "web-data",
583
  "data": str(soup),
584
  }
585
- #await websocket.send(json.dumps(response_data))
586
  # Convert the final soup to a string
587
- final_html = str(soup)
588
 
589
- # Send the HTML in chunks
590
- await send_html_chunked(websocket, final_html)
591
 
592
  elif event["command"]["type"]=="create":
593
  if event["item"]=="folder":
@@ -972,18 +969,14 @@ async def exe(websocket,connected,key,process_ids):
972
  print("No <body> tag found in the HTML")
973
 
974
  # Inline CSS and JavaScript
975
- soup = inline_resources(soup, url)
976
 
977
  response_data = {
978
  "type": "web-data",
979
  "data": str(soup),
980
  }
981
- #await websocket.send(json.dumps(response_data))
982
- # Convert the final soup to a string
983
- final_html = str(soup)
984
 
985
- # Send the HTML in chunks
986
- await send_html_chunked(websocket, final_html)
987
 
988
  elif event["command"]["type"]=="create":
989
  if event["item"]=="folder":
 
576
  print("No <body> tag found in the HTML")
577
 
578
  # Inline CSS and JavaScript
579
+ # soup = inline_resources(soup, url)
580
 
581
  response_data = {
582
  "type": "web-data",
583
  "data": str(soup),
584
  }
585
+ await websocket.send(json.dumps(response_data))
586
  # Convert the final soup to a string
 
587
 
 
 
588
 
589
  elif event["command"]["type"]=="create":
590
  if event["item"]=="folder":
 
969
  print("No <body> tag found in the HTML")
970
 
971
  # Inline CSS and JavaScript
972
+ # soup = inline_resources(soup, url)
973
 
974
  response_data = {
975
  "type": "web-data",
976
  "data": str(soup),
977
  }
978
+ await websocket.send(json.dumps(response_data))
 
 
979
 
 
 
980
 
981
  elif event["command"]["type"]=="create":
982
  if event["item"]=="folder":