aashraychegu commited on
Commit
b493477
·
1 Parent(s): c0c8825

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -3,6 +3,7 @@ import os
3
  import requests
4
  import binascii
5
  from PIL import Image
 
6
  url = "https://www.mindat.org/imagecache/46/9c/03220450016186848702713.jpg"
7
  headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3',
8
  "Accept" : "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
@@ -27,7 +28,6 @@ def greet():
27
  img = requests.get(url,headers = headers).content
28
  # print(img)
29
  print(len(img))
30
- os.touch("./test.jpg")
31
  with open("./test.jpg","wb+") as f:
32
  f.write(img)
33
  return Image.open("./test.jpg")
 
3
  import requests
4
  import binascii
5
  from PIL import Image
6
+
7
  url = "https://www.mindat.org/imagecache/46/9c/03220450016186848702713.jpg"
8
  headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3',
9
  "Accept" : "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
 
28
  img = requests.get(url,headers = headers).content
29
  # print(img)
30
  print(len(img))
 
31
  with open("./test.jpg","wb+") as f:
32
  f.write(img)
33
  return Image.open("./test.jpg")