mediapart-edition
This commit is contained in:
parent
1c1c29942e
commit
81e377037d
10
mediapart-edition.py
Executable file
10
mediapart-edition.py
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/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())
|
Loading…
Reference in a new issue