Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests
- from bs4 import BeautifulSoup
- def Parse(url: str):
- headers = {
- "User-Agent": "Для приличия что нибудь поставь"
- }
- html = requests.get(urlб headers=headers).text
- soup = BeautifulSoup(html, "lxml")
- people = []
- for row in soup.find_all("tr"):
- people.append({
- "name": row.find_all("td")[0].text,
- "birthday": row.find_all("td")[1].text,
- "address": row.find_all("td")[2].text,
- })
- return people
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement