Update app.py
Browse files
app.py
CHANGED
@@ -6,6 +6,10 @@ import os
|
|
6 |
|
7 |
def get_metadata(url):
|
8 |
try:
|
|
|
|
|
|
|
|
|
9 |
response = requests.get(url)
|
10 |
soup = BeautifulSoup(response.text, 'html.parser')
|
11 |
|
|
|
6 |
|
7 |
def get_metadata(url):
|
8 |
try:
|
9 |
+
# Prepend "https://" if the URL doesn't have a scheme
|
10 |
+
if not url.startswith(('http://', 'https://')):
|
11 |
+
url = 'https://' + url
|
12 |
+
|
13 |
response = requests.get(url)
|
14 |
soup = BeautifulSoup(response.text, 'html.parser')
|
15 |
|