Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests
- from bs4 import BeautifulSoup
- query = "mapageweb.com"
- headers = {'Accept-Encoding': 'identity', "User-Agent": "Mozilla/532.0 (Windows NT x.y; rv:10.0) Gecko/20100101 Firefox/10.0"}
- r = requests.get(query, headers=headers)
- if r.status_code == 200:
- soup = BeautifulSoup(r.text, features="html.parser")
- a = soup.find_all('td').find_all("a")
- for i in a:
- content = i.string
- print(content)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement