Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/302.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python SublimiteText生成输出未显示_Python - Fatal编程技术网

Python SublimiteText生成输出未显示

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,但升华文本不

我正在学习使用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,但升华文本不会在生成输出中显示html

print('html_con')

这将打印>>html\u-con,因为引号中的包装表示打印此字符串,而不是对象html\u-con。这对我来说很有效,我使用Sublime3删除打印语句中“html\u con”周围的引号,如下所示

print(html_con)
否则,您只是告诉解释器打印字符串“html\u-con”。

您确定html\u-con不是空的吗?