Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Python Script to Scrape Data From Website

import os
import requests
from bs4 import BeautifulSoup
url = "https://www.google.com/"
reponse = requests.get(url)
if reponse.ok:
 soup = BeautifulSoup(reponse.text, "lxml")
 title = str(soup.find("title"))
 title = title.replace("<title>", "")
 title = title.replace("</title>", "")
 print("The title is : " + str(title))
os.system("pause")
Source by medium.com #
 
PREVIOUS NEXT
Tagged: #Python #Script #Scrape #Data #From #Website
ADD COMMENT
Topic
Name
6+6 =