blazingbunny commited on
Commit
bfe47e8
·
verified ·
1 Parent(s): 442c8f7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
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