https://github.com/yt-dlp/yt-dlp/pull/3975
- fix Popen.communicate() calls - move and simplify _process_chrome_cookie() code - remove random print() statement and config dict
most of the code is adapted from yt-dlp's implementation and *should* work the same.