Datasets:
File size: 596 Bytes
74df0ce 41c4354 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
import requests
from bs4 import BeautifulSoup
def extract_mp3_link(page_url):
try:
response = requests.get(page_url)
response.raise_for_status()
soup = BeautifulSoup(response.text, "html.parser")
audio_div = soup.find("div", class_="jsAudioPlayer")
mp3_link = audio_div.find("a", class_="streaming")["href"]
return mp3_link
except Exception as e:
print(f"Erreur lors de l'extraction du lien MP3 : {e}")
return None
url = "https://www.jw.org/mos/d-s%E1%BA%BDn-yiisi/biible/nwt/books/S%C9%A9ngre/50/"
extract_mp3_link(url) |