I am scrapping data from a web where time has been defined in this format Conditions at local time 09:18 on 23 October 2018 . Based on the given format i want to convert it in ISO format.
To get rid of extra text i followed this approach:
soup = BeautifulSoup(homePage.content, 'html.parser')
time1 = soup.find("caption")
time2 = time1.get_text().split()
filtter = ["Conditions", "at", "local", "time", "on"]
for m in time2:
#print(m)
if m not in filtter:
test = m
print(test.split)
Result of this code is below:
09:24
23
October
2018
Can anyone guide me here?
Thanks