Answers for "request url in web scraping"

2

request url in web scraping

import requests
from bs4 import BeautifulSoup
res = requests.get('https://www.tutorialspoint.com/tutorialslibrary.htm')
print("The status code is ", res.status_code)
print("\n")
soup_data = BeautifulSoup(res.text, 'html.parser')
print(soup_data.title)
print("\n")
print(soup_data.find_all('h4'))
Posted by: Guest on April-09-2022

Python Answers by Framework

Browse Popular Code Answers by Language