-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAssignment1.py
More file actions
31 lines (18 loc) · 744 Bytes
/
Assignment1.py
File metadata and controls
31 lines (18 loc) · 744 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import requests
from bs4 import BeautifulSoup
proxy_Domain = ("https://www.proxynova.com/proxy-server-list/", "tbl_proxy_list")
r = requests.get(proxy_Domain[0])
soup = BeautifulSoup(r.content, 'html.parser')
table = soup.find('table', {'id': proxy_Domain[1]})
for row in table.find_all('tr'):
columns = row.find_all('td')
try:
print('-------')
print('%s:%s%-10s%-10s' % (columns[0].find('abbr').attrs['title'],
columns[1].get_text(),
columns[5].get_text(),
columns[6].get_text()
)
)
except:
pass