Re: creating a csv from information I have printed to screen

2020-05-22 Thread Ciarán Hudson
This has helped a lot; cleaner output, keeping tbl format and creating a csv but the csv is not being populated. Any idea what I am doing wrong? import requests import csv, sys from bs4 import BeautifulSoup cookies = { 'ApplicationGatewayAffinity': '1d2ad8ab214d1293a4e31bcd161589fa82a54a

Re: creating a csv from information I have printed to screen

2020-05-22 Thread Peter Otten
Ciarán Hudson wrote: > This has helped a lot; cleaner output, keeping tbl format and creating a > csv but the csv is not being populated. Any idea what I am doing wrong? > writer = csv.writer(sys.stdout) > writer.writerow([ > 'Arriving From' > 'Airline', > 'Scheduled to arrive', 'Late

Re: creating a csv from information I have printed to screen

2020-05-22 Thread Peter Otten
Ciarán Hudson wrote: > How do I edit the code below to create a csv file which includes the > information I have printed at the bottom? > > I'm pulling arrival data from an airport website and printing out only the > flight info. I want to save that flight info to a CSV file. First of all the da

creating a csv from information I have printed to screen

2020-05-21 Thread Ciarán Hudson
How do I edit the code below to create a csv file which includes the information I have printed at the bottom? I'm pulling arrival data from an airport website and printing out only the flight info. I want to save that flight info to a CSV file. import requests from bs4 import BeautifulSoup c