Download our e-book of Introduction To Python
Raj Mehta
2 years ago
conda install Beaustifulsoap
import urllib.request
from bs4 import BeautifulSoup
request_url = urllib.request.urlopen('https://insideaiml.com/')
html_doc = request_url.read()
# Parse the html file
soup = BeautifulSoup(html_doc, 'html.parser')
# Format the parsed html file
strhtm = soup.prettify()
# Print the first few characters
print (strhtm[:225])
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Google Tag Manager -->
<!-- <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
import urllib.request
from bs4 import BeautifulSoup
request_url = urllib.request.urlopen('https://insideaiml.com/')
html_doc = request_url.read()
# Parse the html file
soup = BeautifulSoup(html_doc, 'html.parser')
print (soup.title)
print(soup.title.string)
InsideAIML
InsideAIML
import urllib.request
from bs4 import BeautifulSoup
request_url = urllib.request.urlopen('https://insideaiml.com/python/python_overview')
html_doc = request_url.read()
# Parse the html file
soup = BeautifulSoup(html_doc, 'html.parser')
for x in soup.find_all('b'):
print(x.string)
Python is Interpreted
Python is Interactive
Python is Object-Oriented
Python is a Beginner's Language
Easy-to-learn
Easy-to-read
Easy-to-maintain
A broad standard library
Interactive Mode
Portable
Extendable
Databases
GUI Programming
Scalable