11 lines
314 B
Python
Executable file
11 lines
314 B
Python
Executable file
#!/usr/bin/env python3
|
|
"""Get the current Mediapart edition. Requires requests and beautifulsoup4."""
|
|
|
|
import requests
|
|
from bs4 import BeautifulSoup
|
|
|
|
html = requests.get("https://www.mediapart.fr").text
|
|
soup = BeautifulSoup(html, "html.parser")
|
|
text = soup.select("div.nav__title._sm")[0].text
|
|
print(text.strip())
|