Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -88,13 +88,29 @@ def make_animation(url1="",url2="",url3="",url4="",url5="",url6="",url7="",url8=
|
|
| 88 |
print(f'{get_url}')
|
| 89 |
|
| 90 |
#get_url=f'{main_directory}images/animations/'
|
| 91 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 92 |
spl = feed1.text.split("href=")
|
| 93 |
files_out=[]
|
| 94 |
html_out=""
|
| 95 |
print("############################ LINES #######################################")
|
| 96 |
|
| 97 |
-
for line in
|
| 98 |
#try:
|
| 99 |
print(line)
|
| 100 |
gif_box=[]
|
|
|
|
| 88 |
print(f'{get_url}')
|
| 89 |
|
| 90 |
#get_url=f'{main_directory}images/animations/'
|
| 91 |
+
if not get_url.endswith('.json'):
|
| 92 |
+
feed1 = requests.get(get_url)
|
| 93 |
+
spl = feed1.text.split("href=")
|
| 94 |
+
for line in spl:
|
| 95 |
+
spl2 = line.split(">")[0]
|
| 96 |
+
print(spl2)
|
| 97 |
+
if spl2.endswith('/"') or spl2.endswith('.json"') or spl2.endswith('.png"') or spl2.endswith('.gif"') or spl2.endswith('.jpg"'):
|
| 98 |
+
fin=line.split(">")[0].strip('""')
|
| 99 |
+
link_box.append(fin)
|
| 100 |
+
#html_out=html_out+html.replace("PAGE_LINK",fin)
|
| 101 |
+
|
| 102 |
+
|
| 103 |
+
|
| 104 |
+
|
| 105 |
+
|
| 106 |
+
print("############################## LINK BOX ###############################")
|
| 107 |
+
print(link_box)
|
| 108 |
spl = feed1.text.split("href=")
|
| 109 |
files_out=[]
|
| 110 |
html_out=""
|
| 111 |
print("############################ LINES #######################################")
|
| 112 |
|
| 113 |
+
for line in link_box[:cnt]:
|
| 114 |
#try:
|
| 115 |
print(line)
|
| 116 |
gif_box=[]
|