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:
BIN
Custom_Templates/.DS_Store
vendored
BIN
Custom_Templates/.DS_Store
vendored
Binary file not shown.
@ -11,9 +11,9 @@
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if groupedUser == false %}
|
||||
if (groupedUser == false) {
|
||||
window.location.href = '/app/sign-up-follow-up'
|
||||
{% endif %}
|
||||
}
|
||||
// let jsDate = new Date();
|
||||
// let jsFormattedDate = jsDate.getFullYear() + ("0" + (jsDate.getMonth() + 1)).slice(-2) + ("0" + jsDate.getDate()).slice(-2);
|
||||
// let liquidFormattedDate = '{{ "now" | date: "%Y-%m-%d" }}';
|
||||
|
||||
@ -426,6 +426,7 @@ Two items from KC:
|
||||
* ILTs available to managers -->
|
||||
* Their enterprise customers basically get a "subdivision" of the academy.
|
||||
* 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.
|
||||
* Westmoreland is the Enterprise pilot.
|
||||
* Claremont "hates them", high set of expectations.
|
||||
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
2575
Scripts/Anthology/domains_w_names.py
Normal file
2575
Scripts/Anthology/domains_w_names.py
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,17 +1,39 @@
|
||||
from requests_html import HTMLSession
|
||||
import requests
|
||||
from bs4 import BeautifulSoup
|
||||
from domains_list import DOMAINS
|
||||
|
||||
for domain in DOMAINS:
|
||||
URL = f"https://{domain}"
|
||||
session = HTMLSession()
|
||||
resp = session.get(URL)
|
||||
def get_college_name(url):
|
||||
special_chars = [" | ", " \ ", " / ", " - ", ": ", " : " ]
|
||||
aca_chars = [
|
||||
"University", "university", "Academy", "academy", "College", "college", "Centre",
|
||||
"centre", "institute", "Institute"
|
||||
]
|
||||
try:
|
||||
title = resp.html.find('head > title', first=True)
|
||||
group_name = title.text.split("|")
|
||||
print(group_name)
|
||||
except AttributeError as e:
|
||||
print(e)
|
||||
finally:
|
||||
title = resp.html.find('head > meta:nth-child(3)', first=True)
|
||||
print(title.text)
|
||||
response = requests.get(f"https://{url}")
|
||||
soup = BeautifulSoup(response.content, "html.parser")
|
||||
college_name = soup.find("title").text
|
||||
except:
|
||||
pass
|
||||
else:
|
||||
for chars in special_chars:
|
||||
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()
|
||||
|
||||
Reference in New Issue
Block a user