Omnibus commited on
Commit
d6ad11a
·
1 Parent(s): fbf97cf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -110,11 +110,14 @@ def details_fn(query):
110
  images = soup.findAll('img')
111
  for i,img in enumerate(images):
112
  if not img['src'].startswith("data:"):
 
 
 
113
  im_id = f'img_{i}'
114
- link_list.append(img['src'])
115
  image_out += f"""
116
  <div id="img_{i}" class='im_each'>
117
- <img onclick="func('{img['src']}','img_{i}')" src={img['src']}>
118
  </div>
119
  """
120
  print (img['src'])
 
110
  images = soup.findAll('img')
111
  for i,img in enumerate(images):
112
  if not img['src'].startswith("data:"):
113
+ imga=img['src']
114
+ if imga.startswith("/"):
115
+ imga = f'{query}/{imga}'
116
  im_id = f'img_{i}'
117
+ link_list.append(imga)
118
  image_out += f"""
119
  <div id="img_{i}" class='im_each'>
120
+ <img onclick="func('{imga}','img_{i}')" src={imga}>
121
  </div>
122
  """
123
  print (img['src'])