1. This website uses cookies to improve service and provide a tailored user experience. By using this site, you agree to this use. See our Cookie Policy.
    Dismiss Notice

My first Proxy script

Discussion in 'Scripting' started by HaryanviJakkat, May 19, 2019.

  1. HaryanviJakkat

    HaryanviJakkat Newbie

    Joined:
    May 19, 2019
    Messages:
    8
    Likes Received:
    0
    Gender:
    Male
    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='')
                
     
  2. PeaceDoge

    PeaceDoge Newbie

    Joined:
    Dec 7, 2017
    Messages:
    46
    Likes Received:
    5
    Gender:
    Male
    Occupation:
    Jack of no trades
    Location:
    Interwebs
    It's not bad. I'm not that good either, but I try. Are you planning to add more?
     
  3. HaryanviJakkat

    HaryanviJakkat Newbie

    Joined:
    May 19, 2019
    Messages:
    8
    Likes Received:
    0
    Gender:
    Male
    Give me website i will make for fun because i love coding
     
  4. OswellESpencer

    OswellESpencer Newbie

    Joined:
    Jan 18, 2018
    Messages:
    6
    Likes Received:
    2
    Gender:
    Male
    Home Page:
    for the next step, try to get a proxy periodically by timeout and save to a file without duplicates ;)
     
    • Thanks Thanks x 1
  5. HaryanviJakkat

    HaryanviJakkat Newbie

    Joined:
    May 19, 2019
    Messages:
    8
    Likes Received:
    0
    Gender:
    Male
    will do that for sure , any website suggestion for scraping ?
     
  6. welneto

    welneto Jr. VIP Jr. VIP

    Joined:
    Jan 24, 2015
    Messages:
    943
    Likes Received:
    202
    Home Page:
  7. HaryanviJakkat

    HaryanviJakkat Newbie

    Joined:
    May 19, 2019
    Messages:
    8
    Likes Received:
    0
    Gender:
    Male
    Yup any website, thanks
     
  8. franz119

    franz119 Regular Member

    Joined:
    Aug 30, 2018
    Messages:
    207
    Likes Received:
    33
    Gender:
    Male
    Ima make some website for you, that has like, a single script tag in it. GL.
     
  9. HaryanviJakkat

    HaryanviJakkat Newbie

    Joined:
    May 19, 2019
    Messages:
    8
    Likes Received:
    0
    Gender:
    Male
    as you guys asked , i created another proxy scraping script which is far better than this one .check it out in scripting section
     
  10. PeaceDoge

    PeaceDoge Newbie

    Joined:
    Dec 7, 2017
    Messages:
    46
    Likes Received:
    5
    Gender:
    Male
    Occupation:
    Jack of no trades
    Location:
    Interwebs
    Good job mate, I'll check it out soon.
     
  11. HaryanviJakkat

    HaryanviJakkat Newbie

    Joined:
    May 19, 2019
    Messages:
    8
    Likes Received:
    0
    Gender:
    Male
    My thread is waiting for moderation , posted it yesterday