diff --git a/readit.py b/readit.py index aeb58db..aa1ca6f 100755 --- a/readit.py +++ b/readit.py @@ -79,7 +79,10 @@ if __name__ == "__main__": ids = parser.parse_args().id - driver = webdriver.PhantomJS(service_args=["--web-security=no"]) + caps = webdriver.DesiredCapabilities().PHANTOMJS.copy() + caps["phantoms.page.settings.userAgent"] = "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0" + + driver = webdriver.PhantomJS(desired_capabilities=caps, service_args=["--web-security=no"]) for id in ids: use = id.split("/")[-1].split("#")[0]