first init
This commit is contained in:
commit
0262e99d22
12
web_scrap.py
Normal file
12
web_scrap.py
Normal file
@ -0,0 +1,12 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
# Python 3
|
||||
# Extraction des liens d'une page web
|
||||
from bs4 import BeautifulSoup
|
||||
import urllib.request
|
||||
|
||||
with urllib.request.urlopen('https://www.clarissariviere.com/') as response:
|
||||
webpage = response.read()
|
||||
soup = BeautifulSoup(webpage, 'html.parser')
|
||||
for anchor in soup.find_all('a'):
|
||||
print(anchor.get('href', '/'))
|
Loading…
x
Reference in New Issue
Block a user