Skip to content

Instantly share code, notes, and snippets.

View charanjit-singh's full-sized avatar
🎯
Focusing

Charanjit Singh charanjit-singh

🎯
Focusing
View GitHub Profile
@charanjit-singh
charanjit-singh / parse.ts
Created November 10, 2023 15:08
Rank Math NextHead NextJS Parser
import { Metadata } from "next";
import { Element, Text, htmlToDOM } from 'html-react-parser';
import { OpenGraph } from "next/dist/lib/metadata/types/opengraph-types";
import { Twitter } from "next/dist/lib/metadata/types/twitter-types";
/**
Example Metadata
<meta name="description" content="Create a professional-looking salary slip for your employees starting this month! Learn all about the important details of a salary slip and the format."/>
<meta name="robots" content="follow, index, max-snippet:-1, max-video-preview:-1, max-image-preview:large"/>
<link rel="canonical" href="https://esahayak.io/blog/salary-slips-templates-download-formats-excel-pdf/" />
@charanjit-singh
charanjit-singh / scrape.py
Created March 10, 2021 13:54
Script to scrape RERA Information from Punjab RERA Website ( using multithreading)
import requests
from bs4 import BeautifulSoup
import codecs
import threading
page = ""
f = codecs.open("RERA_PUNJAB_LIST.html","r")
page = f.read()
soup = BeautifulSoup(page, 'html.parser')