Python:忽略异常:<bound method =“”service .__ del __ =“”of =“”<selenium.webdriver.chrome.service.service =“”object =“”at =“”0x0000015937cea128 =“”>&gt;

时间:2017-05-23 18:13:57

标签: python excel selenium web web-scraping

使用的代码:

from selenium import webdriver
from bs4 import BeautifulSoup
from urllib.request import urlopen
from urllib.parse import urlparse
import requests, bs4

res = requests.get('http://www.iceomatic.com/Products/Ice-Machines/Cubers/')
icesoup = bs4.BeautifulSoup(res.text,'lxml')
selectElems = icesoup.select('li')
len(selectElems)
type(selectElems[0])
selectElems[0].getText()

主要目标是将不同产品的数据放入Excel表格中。我刚开始研究它。尝试创建html对象以进行进一步处理。

以下是输出:

Exception ignored in: <bound method Service.__del__ of 
<selenium.webdriver.chrome.service.Service object at 0x0000026E252CA128>>
Traceback (most recent call last):
File "C:\Users\Santosh\Anaconda3\lib\site-
packages\selenium\webdriver\common\service.py", line 163, in __del__
File "C:\Users\Santosh\Anaconda3\lib\site-
packages\selenium\webdriver\common\service.py", line 139, in stop
File "C:\Users\Santosh\Anaconda3\lib\site-
packages\selenium\webdriver\common\service.py", line 110, in 
send_remote_shutdown_command
ImportError: sys.meta_path is None, Python is likely shutting down

请提出解决方案。

由于

0 个答案:

没有答案