I'm trying to automate an email sending service which sends a person's bus station to his mail. In order to do so I need to pull some data from a Hebrew website.
I need to append to a list from the same website but from a different tab/page (I managed to pull the first page), and then to write the data to a CSV file.
I managed to pull the first page to a data frame list:
import requests
import pandas as pd
import csv
url = 'http://yit.maya-tour.co.il/yit-pass/Drop_Report.aspx?
client_code=2660&coordinator_code=2669'
html = requests.get(url).text
df_list = pd.read_html(html)
print(df_list)
myFile = open('my data.csv', 'wb')
wr = csv.writer(myFile, quoting=csv.QUOTE_ALL)
wr.writerow(df_list)
i can't find a way to write to file, as I get the message: "TypeError: a bytes-like object is required, not 'str'"
I expect to get the full list from multiple pages and then to write to CSV.