Skip to content

Commit

Permalink
fix: remove missing conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
taiporto committed Mar 19, 2024
1 parent a521a4e commit d51cbfb
Showing 1 changed file with 0 additions and 43 deletions.
43 changes: 0 additions & 43 deletions cardapiogetter.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,48 +5,6 @@

def getCardapio(url):

<<<<<<< HEAD
data = []

html = urlopen(url)
res = soup(html.read(),"html5lib")

tbody = res.find('tbody')

tableRows = tbody.find_all('tr')
tableRows.pop(0)

for row in tableRows:
columns = row.find_all('td')
if row:
output_row = []
for column in columns:
output_row.append(column.text)
data.append(output_row)

df = pd.DataFrame(data)
dfLunch = df.iloc[0:8]
dfLunch.reset_index(drop=True)

dfDinner = df.iloc[8:16]

new_header = dfLunch.iloc[0]
new_header[4] = "Quinta-Feira"
dfLunch = dfLunch[1:]
dfLunch.columns = new_header
new_header = dfDinner.iloc[0]
new_header[4] = "Quinta-Feira"
dfDinner = dfDinner[1:]
dfDinner.columns = new_header

if (dfLunch is not None) and (dfDinner is not None):
print("Resultado pronto!")
print(url)
print(dfLunch, dfDinner)
return [dfLunch, dfDinner]
else:
print("Erro")
=======
data = []

html = urlopen(url)
Expand Down Expand Up @@ -87,4 +45,3 @@ def getCardapio(url):
return [dfLunch, dfDinner]
else:
print("Erro")
>>>>>>> ba374a4... fix: change html parsing method and week day finding

0 comments on commit d51cbfb

Please sign in to comment.