Monday, February 6, 2023
SEO Scraper
import requests
from bs4 import BeautifulSoup
url = "https://www.example.com"
response = requests.get(url)
soup = BeautifulSoup(response.text, "html.parser")
# Extract the title
title = soup.find("title").text
print("Title:", title)
# Extract the description
description = soup.find("meta", attrs={"name": "description"})["content"]
print("Description:", description)
# Extract the keywords
keywords = soup.find("meta", attrs={"name": "keywords"})["content"]
print("Keywords:", keywords)
Subscribe to:
Comments (Atom)
XML Sitemap Generator
XML Sitemap Generator XML Sitemap Generator Enter URLs (one per line): Set...
-
List to Comma-Delimited String Tool List to Comma-Delimited String Tool Convert to Comma-Delimited St...
-
Multi-Location Keyword Search Multi-Location Keyword Search ...