imperialwool commited on
Commit
d44e618
·
1 Parent(s): b00bedf

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +2 -11
utils.py CHANGED
@@ -6,11 +6,11 @@ from asyncio import get_running_loop
6
  from asyncio import sleep as asyncsleep
7
  from random import randint
8
  import aiofiles
 
9
 
10
  model = load_model("model.h5")
11
  proxies = [
12
- #"http://q2adq9_proton_me:qwerty123123@la.residential.rayobyte.com:8000",
13
- "http://ocjjjsgs:[email protected]:6106"
14
  ]
15
 
16
  async def get_binary_from_link(link: str) -> bytes:
@@ -104,15 +104,6 @@ async def predict(url: str, recursion: int = 0, fnfnfn: int = randint(1, 1000000
104
  print(f"4, {recursion}, {str(e)}")
105
  return await predict(url, recursion + 1, fnfnfn)
106
 
107
- # processor = CaptchaProcessor(binary)
108
- # processor.replace_color(processor.get_background_color(), processor.WHITE_RGB)
109
- # processor.replace_colors(processor.get_letters_color(), processor.WHITE_RGB)
110
- # processor.convert_color_space(6)
111
- # processor.threshold()
112
- #except Exception as e:
113
- # print(f"error with image, trying again {e}")
114
- # return await predict(url, recursion + 1)
115
-
116
  try:
117
  processor.increase_letters_size(2)
118
  except IndexError:
 
6
  from asyncio import sleep as asyncsleep
7
  from random import randint
8
  import aiofiles
9
+ import os
10
 
11
  model = load_model("model.h5")
12
  proxies = [
13
+ str(os.environ.get("HTTP_PROXY"))
 
14
  ]
15
 
16
  async def get_binary_from_link(link: str) -> bytes:
 
104
  print(f"4, {recursion}, {str(e)}")
105
  return await predict(url, recursion + 1, fnfnfn)
106
 
 
 
 
 
 
 
 
 
 
107
  try:
108
  processor.increase_letters_size(2)
109
  except IndexError: