Q:

How do I turn the file commands into a print statement?

    page = requests.get('https://free-proxy-list.net/')
    soup = BeautifulSoup(page.text, 'html.parser')
    text_table = soup.find('table', attrs={'id':'proxylisttable'})
    body = text_table.find('tbody')

    for row in body.find_all('tr'):
        cols = row.find_all('td')[:7]
        proxies.append({
            'ip': cols[0].text,
            'port': cols[1].text,
            'iso': cols[2].text,
            'country': cols[3].text,
            'protocol': 'https' if cols[6].text == 'yes' else 'http',
            'alive': True})

   with open("proxies.txt","w+") as file:
       [file.write(f"{p['ip']}:{p['port']}\n") for p in proxies]

    os.startfile('proxies.txt')
else:
    print("Socks4, Socks5 Not available yet. Contact --- on --- if you want Socks4/5 in the next update.")

Basically, this code writes the scraped information (from the website) to a file. Pyinstaller doesn't support 3.6+ features so I need to adjust the code to make it print the information into the cmd console. Please provide answers that can only be used in 3.6 or below.

A:

Fixed. Added:
print(cols[0].text)

to body.find_all

