HaryanviJakkat
Newbie
- May 19, 2019
- 10
- 3
Hello guys ,i'm learning python and made my first proxy scraping script , i know my code is ugly and sorry about that .
Code:
from bs4 import BeautifulSoup
import requests
import csv
source = requests.get('https://free-proxy-list.net/').text
soup = BeautifulSoup(source, 'lxml')
proxytable = soup.find('table')
#print(proxytable)
for proxy in proxytable.find_all('tr'):
for plist in proxy.find_all('td')[0:1]:
for polist in proxy.find_all('td')[1:2]:
print ((plist.text),':',(polist.text),sep='')