Skip to content

Instantly share code, notes, and snippets.

View hbhutta's full-sized avatar

Haad Bhutta hbhutta

View GitHub Profile
@hbhutta
hbhutta / tch.py
Created December 28, 2023 00:09
Python script to get cities from TransCanadaHighway (TCH) website
import requests
from bs4 import BeautifulSoup
from time import sleep
import json
from pprint import pprint
import re
def find_phone_numbers(text: str) -> list[str]:
pattern = re.compile(r'\b\d{3}-\d{3}-\d{4}')
phone_numbers = re.findall(pattern, text)