發表文章

目前顯示的是有「image analysis」標籤的文章

python BeautifulSoup

圖片
from urllib.request import urlopen from bs4 import BeautifulSoup import re In [155]: h = urlopen ( "http://www.pythonscraping.com/pages/page3.html" ) In [156]: hb = BeautifulSoup ( h ) C:\Users\peter\Anaconda3\lib\site-packages\bs4\__init__.py:181: UserWarning: No parser was explicitly specified, so I'm using the best available HTML parser for this system ("lxml"). This usually isn't a problem, but if you run this code on another system, or in a different virtual environment, it may use a different parser and behave differently. The code that caused this warning is on line 184 of the file C:\Users\peter\Anaconda3\lib\runpy.py. To get rid of this warning, change code that looks like this: BeautifulSoup([your markup]) to this: BeautifulSoup([your markup], "lxml") markup_type=markup_type)) In [157]: print ( hb ) Totally Normal Gifts Here is a collection o...