import requests
import re

url='https://hmu.gr/akadimaiko-imerologio-2025-2026/'

txt= requests.get(url).text
# print(txt)

a = re.findall('<table(.*?)</table', txt, re.DOTALL)

# print(a)

for c in a:
    #c= re.sub(r'<sup>', '', c)
    #c= re.sub(r'&nbsp;', '', c)
    #c=re.sub(r'</sup>', '', c)
    c=re.sub('<.*?>', '', c)
    c=re.sub('&.*?;', '', c)
    #c=re.sub(r'\n+', r'\n', c)
    c=re.sub(r'\xa0\n', r'', c)
#print(c)

for i in range(0,len(c)):
    print(c[i], end="")





foo= input('\nΔώσε <ENTER> για τερματισμό.')
