Skip to content

Instantly share code, notes, and snippets.

@nikhilweee
nikhilweee / registration_info.py
Last active February 25, 2024 14:12
Get vehicle info from an Indian registration number
import sys
import requests
from bs4 import BeautifulSoup, SoupStrainer
home_url = 'https://parivahan.gov.in/rcdlstatus/'
post_url = 'https://parivahan.gov.in/rcdlstatus/vahan/rcDlHome.xhtml'
# Everything before the last four digits: MH02CL
first = sys.argv[1]
# The last four digits: 0555
second = sys.argv[2]