US = "https://www.voiptroubleshooter.com/open_speech/american.html"
UK = "https://www.voiptroubleshooter.com/open_speech/british.html"
import requests
from bs4 import BeautifulSoup

def get_wav_links(url):
    response = requests.get(url, headers={"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/37.0.2062.94 Chrome/37.0.2062.94 Safari/537.36"})
    assert response.status_code == 200, f"Failed to fetch {url}: {response.status_code}"
    soup = BeautifulSoup(response.text, 'html.parser')
    links = []

    for a in soup.find_all('a', href=True):
        if a['href'].endswith('.wav'):
            links.append(f"https://www.voiptroubleshooter.com/open_speech/{a['href']}")
    return links
get_wav_links(UK)