Fixed an error in blacklane's templates (dont try to mix programming languages...) Anthology domains list was finalized and pulled ready for client review.

This commit is contained in:
Norm Rasmussen
2024-03-15 20:45:21 -04:00
parent f32ce078e1
commit 1394112a9b
7 changed files with 4160 additions and 1117 deletions

Binary file not shown.

View File

@ -11,9 +11,9 @@
{% endfor %} {% endfor %}
{% endif %} {% endif %}
{% if groupedUser == false %} if (groupedUser == false) {
window.location.href = '/app/sign-up-follow-up' window.location.href = '/app/sign-up-follow-up'
{% endif %} }
// let jsDate = new Date(); // let jsDate = new Date();
// let jsFormattedDate = jsDate.getFullYear() + ("0" + (jsDate.getMonth() + 1)).slice(-2) + ("0" + jsDate.getDate()).slice(-2); // let jsFormattedDate = jsDate.getFullYear() + ("0" + (jsDate.getMonth() + 1)).slice(-2) + ("0" + jsDate.getDate()).slice(-2);
// let liquidFormattedDate = '{{ "now" | date: "%Y-%m-%d" }}'; // let liquidFormattedDate = '{{ "now" | date: "%Y-%m-%d" }}';

View File

@ -426,6 +426,7 @@ Two items from KC:
* ILTs available to managers --> * ILTs available to managers -->
* Their enterprise customers basically get a "subdivision" of the academy. * Their enterprise customers basically get a "subdivision" of the academy.
* Manager permissions are key to this. * Manager permissions are key to this.
* For anyone to sign up.
* Only option right now is enterprise customers put in a request for an ILT to be created and shown to their specific groups. * Only option right now is enterprise customers put in a request for an ILT to be created and shown to their specific groups.
* Westmoreland is the Enterprise pilot. * Westmoreland is the Enterprise pilot.
* Claremont "hates them", high set of expectations. * Claremont "hates them", high set of expectations.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,17 +1,39 @@
from requests_html import HTMLSession import requests
from bs4 import BeautifulSoup
from domains_list import DOMAINS from domains_list import DOMAINS
for domain in DOMAINS: def get_college_name(url):
URL = f"https://{domain}" special_chars = [" | ", " \ ", " / ", " - ", ": ", " : " ]
session = HTMLSession() aca_chars = [
resp = session.get(URL) "University", "university", "Academy", "academy", "College", "college", "Centre",
"centre", "institute", "Institute"
]
try: try:
title = resp.html.find('head > title', first=True) response = requests.get(f"https://{url}")
group_name = title.text.split("|") soup = BeautifulSoup(response.content, "html.parser")
print(group_name) college_name = soup.find("title").text
except AttributeError as e: except:
print(e) pass
finally: else:
title = resp.html.find('head > meta:nth-child(3)', first=True) for chars in special_chars:
print(title.text) if chars in college_name:
tmpname = college_name.split(chars)
for words in tmpname:
for acas in aca_chars:
if acas in words:
return words
else:
return college_name
def main():
for domain in DOMAINS.keys():
name = get_college_name(domain)
if name is not None:
outFile = open("domains_w_names.py","a")
outFile.writelines(f"{domain}: {name} \n")
outFile.close()
print(f"{domain} - {name}")
if __name__ == "__main__":
main()