menu nav list
This commit is contained in:
parent
64118a3c20
commit
a03489ee21
13
web_scrap.py
13
web_scrap.py
@ -9,11 +9,8 @@ page = requests.get("https://www.clarissariviere.com")
|
|||||||
|
|
||||||
if page.status_code == 200:
|
if page.status_code == 200:
|
||||||
soup = BeautifulSoup(page.text, 'html.parser')
|
soup = BeautifulSoup(page.text, 'html.parser')
|
||||||
for anchor in soup.find_all('a'):
|
ul = soup.find_all("ul", id="listsmooth")
|
||||||
print(anchor.get('href', '/'))
|
for anchor in ul[0].find_all("a"):
|
||||||
#with urllib.request.urlopen('https://www.clarissariviere.com/index.html') as response:
|
href = anchor.get('href', '/')
|
||||||
# print(response)
|
if href != "#" and href != "http://www.clarissariviere.com/":
|
||||||
#webpage = response.read()
|
print(href)
|
||||||
#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