Omnibus commited on
Commit
6def092
·
verified ·
1 Parent(s): 6e5ae84

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -112,16 +112,22 @@ def make_animation():
112
  spl3 = feed2.text.split("href=")
113
  for line2 in spl3:
114
  spl3 = line2.split(">")[0].strip('""')
 
 
115
  if spl3.endswith(".png") or spl3.endswith(".gif") or spl3.endswith(".jpg"):
116
  gif_box.append(f'{get_url}{spl2}{spl3}')
117
 
118
  #frames = [Image.open(image) for image in glob.glob(f"{frame_folder}/*.JPG")]
119
  frames = []
120
  for i,ea in enumerate(gif_box):
 
 
121
  urllib.request.urlretrieve(ea,f'tmp{i}.png')
122
  frames.append(Image.open(f'tmp{i}.png'))
123
  frame_one = frames[0]
124
  filename=f'{spl3.split(".")[0]}.gif'
 
 
125
  frame_one.save(filename, format="GIF", append_images=frames,
126
  save_all=True, duration=100, loop=0)
127
  html_out+=f'<div class="img_class"><img src="{filename}"></div>'
 
112
  spl3 = feed2.text.split("href=")
113
  for line2 in spl3:
114
  spl3 = line2.split(">")[0].strip('""')
115
+ print("$$$$$$$$$$$$$$")
116
+ print(spl3)
117
  if spl3.endswith(".png") or spl3.endswith(".gif") or spl3.endswith(".jpg"):
118
  gif_box.append(f'{get_url}{spl2}{spl3}')
119
 
120
  #frames = [Image.open(image) for image in glob.glob(f"{frame_folder}/*.JPG")]
121
  frames = []
122
  for i,ea in enumerate(gif_box):
123
+ print("############")
124
+ print(ea)
125
  urllib.request.urlretrieve(ea,f'tmp{i}.png')
126
  frames.append(Image.open(f'tmp{i}.png'))
127
  frame_one = frames[0]
128
  filename=f'{spl3.split(".")[0]}.gif'
129
+ print("**************")
130
+ print(filename)
131
  frame_one.save(filename, format="GIF", append_images=frames,
132
  save_all=True, duration=100, loop=0)
133
  html_out+=f'<div class="img_class"><img src="{filename}"></div>'