Update app.py
Browse files
app.py
CHANGED
@@ -4,11 +4,11 @@ import os
|
|
4 |
|
5 |
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
|
13 |
|
14 |
|
|
|
4 |
|
5 |
|
6 |
|
7 |
+
response = requests.get(https://img.zcool.cn/community/0104c15cd45b49a80121416816f1ec.jpg@1280w_1l_2o_100sh.jpg)
|
8 |
+
file_name = download_url.split("/")[-1] # Extracting the file name from the URL
|
9 |
+
save_path = os.path.join(os.getcwd(), file_name)
|
10 |
+
with open(save_path, 'wb') as f:
|
11 |
+
f.write(response.content)
|
12 |
|
13 |
|
14 |
|