q6 commited on
Commit
cec3ffe
·
1 Parent(s): df21b10

Uopdate base26t

Browse files
Files changed (1) hide show
  1. API/app.py +8 -13
API/app.py CHANGED
@@ -30,19 +30,14 @@ async def fetch_page(session, url):
30
  def build_cookies(phpsessid: str) -> Dict[str, str]:
31
  return {"PHPSESSID": phpsessid}
32
 
33
- def base26(n):
34
- if n == 0:
35
- return "A"
36
-
37
- b26 = ""
38
- while n > 0:
39
- n, remainder = divmod(n, 26)
40
- b26 = chr(97 + remainder) + b26
41
-
42
- return b26
43
-
44
  def base26_time():
45
- return base26(int(time.time()))
 
 
 
 
 
 
46
 
47
  def determine_exif_type(metadata):
48
  if metadata is None:
@@ -181,7 +176,7 @@ async def pixif(
181
  results = await asyncio.gather(*tasks)
182
 
183
  image_exifs = {post_id: image_url.replace(img_base, '', 1) for post_id, image_url in results if image_url}
184
- print(image_exifs)
185
  return image_exifs
186
 
187
  @app.get("/")
 
30
  def build_cookies(phpsessid: str) -> Dict[str, str]:
31
  return {"PHPSESSID": phpsessid}
32
 
 
 
 
 
 
 
 
 
 
 
 
33
  def base26_time():
34
+ x=''
35
+ n=int(time.time()*100)
36
+ while n:
37
+ x=chr(97+n%26)+x
38
+ n//=26
39
+
40
+ return x
41
 
42
  def determine_exif_type(metadata):
43
  if metadata is None:
 
176
  results = await asyncio.gather(*tasks)
177
 
178
  image_exifs = {post_id: image_url.replace(img_base, '', 1) for post_id, image_url in results if image_url}
179
+
180
  return image_exifs
181
 
182
  @app.get("/")