我正面临与npm install有关的问题,并尝试了所有注册表命令,但仍无法解决问题
from selenium import webdriver
url = "http://www.dsv.de/schwimmen/wettkampf-national/schwimmerabfrage/"
driver = webdriver.Chrome()
driver.get(url)
driver.switch_to.frame(0);
submit_button = driver.find_element_by_name("_submitButton")
fistname_textbox = driver.find_element_by_xpath('//*[@id="_firstnameTextBox"]')
lastname_textbox = driver.find_element_by_xpath('//*[@id="_lastnameTextBox"]')
regid_textbox = driver.find_element_by_id("_regidTextBox")
fistname_textbox.send_keys("String 1")
lastname_textbox.send_keys("String 2")
submit_button.click()
driver.close()
答案 0 :(得分:0)
看来您在某种防火墙或代理后面,该防火墙或代理阻止了对npm注册表的请求。多数民众赞成在为什么它返回的HTML(可能某些重定向/禁止)。
从类似的帖子中查看此答案 Running npm behind a corporate firewall: what do I need to tell the security team?
npm配置集代理http://company.com:8000或
npm配置设置https-proxy http://company.com:8000,其中 http://company.com:8000是您的代理服务器和端口