Update app.py
Browse files
app.py
CHANGED
@@ -141,9 +141,9 @@ def process_webpage(url):
|
|
141 |
rendered_content = get_youtube_transcript(url)
|
142 |
else:
|
143 |
# Fetch and parse webpage
|
144 |
-
response = requests.get(url)
|
145 |
-
soup = BeautifulSoup(response, "html.parser")
|
146 |
-
title = soup.title.string if soup.title else "No Title Found"
|
147 |
# Create a clickable hotlink
|
148 |
hotlink = f'<a href="{url}" target="_blank" style="color:blue;text-decoration:underline;">{title}</a>'
|
149 |
|
|
|
141 |
rendered_content = get_youtube_transcript(url)
|
142 |
else:
|
143 |
# Fetch and parse webpage
|
144 |
+
response = requests.get(url)
|
145 |
+
soup = BeautifulSoup(response.text, "html.parser")
|
146 |
+
title = soup.title.string.strip() if soup.title else "No Title Found"
|
147 |
# Create a clickable hotlink
|
148 |
hotlink = f'<a href="{url}" target="_blank" style="color:blue;text-decoration:underline;">{title}</a>'
|
149 |
|