V
V
Vyacheslav Grachunov2020-03-11 23:40:16
Python
Vyacheslav Grachunov, 2020-03-11 23:40:16

Why doesn't this code work on Windows (pyppeteer)?

async def process(query):


  print('START PROCESS')

  
  async with aiofiles.open(os.path.join(BASEDIR, config['PARSER']['Proxies']), mode='r', encoding="utf-8") as f:
    proxies = await f.readlines()
    await f.close()

  proxies = [x.strip() for x in proxies if x != '']
  proxy = random.choice(proxies)


  print('OZZZZZ')
  browser = await launch(headless=False, args=['--no-sandbox', '--proxy-server='+proxy, ])
  print(4)
  #Далее код


Asynchronous launch of chrome processes for parsing. On Linux (Debian) everything works, but on Windows (7 and 10) it doesn't. The browser starts and stops. print(4) is gone, as is further execution. What could be the problem?
Both on Linux and Windows - Python 3.7.4

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question