refactored to use selenium, which handles proxies better