So here gone look a getting source from the web with BeautifulSoup and lxml.
For both BS and lxml(aslo has it's own method) is advisable to use Requests.
So i install Requests into my virtual environment:
Gone use
We are getting the
As mention before in part-1 use Developer Tools Chrome and FireFox(earlier FireBug) to navigate/inspect web-site.
So using method over XPath
to get the head title tag.
For both BS and lxml(aslo has it's own method) is advisable to use Requests.
So i install Requests into my virtual environment:
Gone use
python.org
as example.We are getting the
head tag
which is <title>Welcome to Python.org</title>
.As mention before in part-1 use Developer Tools Chrome and FireFox(earlier FireBug) to navigate/inspect web-site.
So using method over XPath
/html/head/title
and CSS selector head > title
,to get the head title tag.
- BeautifulSoup CSS selector
- lxml XPath
- lxml CSS selector