Python SublimiteText生成输出未显示
我正在学习使用selenium和chromedriver使用python进行Web垃圾处理Python SublimiteText生成输出未显示,python,Python,我正在学习使用selenium和chromedriver使用python进行Web垃圾处理 from selenium import webdriver driver=webdriver.Chrome(executable_path=r'C:\chromedriver\chromedriver.exe') driver.get('http://python.org') html_con=driver.page_source print('html_con') 只打开url,但升华文本不
from selenium import webdriver
driver=webdriver.Chrome(executable_path=r'C:\chromedriver\chromedriver.exe')
driver.get('http://python.org')
html_con=driver.page_source
print('html_con')
只打开url,但升华文本不会在生成输出中显示html
print('html_con')
这将打印>>html\u-con,因为引号中的包装表示打印此字符串,而不是对象html\u-con。这对我来说很有效,我使用Sublime3删除打印语句中“html\u con”周围的引号,如下所示
print(html_con)
否则,您只是告诉解释器打印字符串“html\u-con”。您确定html\u-con不是空的吗?