简体   繁体   中英

sublimetext build output not showing

I am learning webscraping with python using selenium and chromedriver.

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')

just the url gets open but sublime text does not show the html in build output

remove quotation marks around the 'html_con' in the print statement like this.

print(html_con)

otherwise you are just telling the interpreter to print the string 'html_con'.

print('html_con')

that's just going to print >> html_con as wrapping that in quotes is saying print this string rather than the object html_con. This worked for me using Sublime3

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM