If you need to extract metadata such as title, description, keywords, Open Graph tags, canonical URL, and Twitter Card information from an HTML page, Python makes this easy using requests and BeautifulSoup. Install Required Packages Install the required Python packages: pip install requests beautifulsoup4 Basic HTML Metadata Scraper Create a Python file named metadata.py: import requests from bs4 import BeautifulSoup url = "https://example.com" response = requests.get( url, headers={ "User-Agent": "Mozilla/5.0" }, timeout=10 ) response....
Python

Scrape HTML Page Metadata Using Python

Compress + Resize Bulk Images in python
from PIL import Image import shutil import os, sys basewidth = 1600 def compress(filename, destfilename, quality_num, cropsize = (), whitebg = False): # Make PNG Background White if whitebg: fill_color = (255,255,255) im = Image.open(filename) im = im.convert('RGBA') background = Image.new(im.mode[:-1], im.size, fill_color) background.paste(im, im.split()[-1]) # omit transparency original = background else: original = Image.open(filename) # Check PNG Images with no Trasperant Data if filename.endswith(".png"): original = original.convert('RGBA') datas = original....