Skip to content

Commit

Permalink
Update exception
Browse files Browse the repository at this point in the history
  • Loading branch information
drohmer committed Jan 6, 2023
1 parent b22f705 commit b3672ac
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions scripts/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,14 @@ def is_url_valid(url):
else:
return True

def check_urls(urls, exitOnError=False):
def check_urls(urls, exitOnError=False, exceptions={}):
success = True
print('Check urls ...')
for url in tqdm.tqdm(urls):
ret = is_url_valid(url)
if ret!=True:
success=False
if url not in exceptions:
ret = is_url_valid(url)
if ret!=True:
success=False

if exitOnError==True and success==False:
print("Exit due to Error")
Expand Down Expand Up @@ -267,7 +268,8 @@ def export_html_static(data):

if is_check_url:
urls = get_all_urls(data)
check_urls(urls, exitOnError=exit_on_failure)
exceptions = {'https://formations.univ-grenoble-alpes.fr/fr/catalogue-2021/master-XB/master-informatique-IAQK9B8Z/parcours-master-of-science-in-informatics-at-grenoble-mosig-IB9GGIRD.html'}
check_urls(urls, exitOnError=exit_on_failure, exceptions=exceptions)

# export json
print('[Export JSON]')
Expand Down

0 comments on commit b3672ac

Please sign in to comment.