摘要: 1.获取页面title title:获取当前页面的标题显示的字段 from selenium import webdriver import time browser = webdriver.Chrome() browser.get('https://www.baidu.com') #打印网页标题 阅读全文
posted @ 2021-10-29 16:09 博无止境 阅读(636) 评论(0) 推荐(0) 编辑
摘要: 异常处理语句格式: try: print("执行语句") except: print("发生异常时执行语句") else: print("没有异常时执行语句") finally: print("不管有没有异常都会执行的语句") 指定异常处理 try: print("执行语句") except Typ 阅读全文
posted @ 2021-10-29 15:27 博无止境 阅读(58) 评论(0) 推荐(0) 编辑