Omnibus commited on
Commit
07eb494
·
verified ·
1 Parent(s): a582447

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -36,16 +36,18 @@ def make_tree(url1="",url2="",url3="",url4=""):
36
  return None
37
 
38
  def get_images():
39
- html_out="<div style='column_count:2;'>"
40
  get_url=f'{main_directory}images/'
41
 
42
  feed1 = requests.get(get_url)
43
  spl = feed1.text.split("href=")
44
  for line in spl:
45
  spl2 = line.split(">")[0].strip('""')
46
- if not spl2.endswith("/"):
47
  print(spl2)
48
  html_out+=f'<div><a href="{get_url}{spl2}">{get_url}{spl2}</a><br><img src={get_url}{spl2}></div>'
 
 
49
  html_out+="</div>"
50
  return html_out
51
 
 
36
  return None
37
 
38
  def get_images():
39
+ html_out="<div style='column-count:2;'>"
40
  get_url=f'{main_directory}images/'
41
 
42
  feed1 = requests.get(get_url)
43
  spl = feed1.text.split("href=")
44
  for line in spl:
45
  spl2 = line.split(">")[0].strip('""')
46
+ if spl2.endswith(".png|.gif|.jpg"):
47
  print(spl2)
48
  html_out+=f'<div><a href="{get_url}{spl2}">{get_url}{spl2}</a><br><img src={get_url}{spl2}></div>'
49
+ else:
50
+ print(spl2)
51
  html_out+="</div>"
52
  return html_out
53