def get_locations():
    locations = []

    for location in base_locations_wrapper:

        if "Chapter Organizer" in location.text:
            name = location.select(".raven-heading-title")[0].text.strip()
            url = location.select(
                "a.raven-button.raven-button-link")[0]["href"]
            asset = {
                "name":
                f"Blacks in Technology - {name}",
                "url":
                url,
                "organization_logo":
                "https://kjaymiller.s3-us-west-2.amazonaws.com/images/blacks-in-technology.jpeg",
                "city":
                name.title(),
                "diversity_focus": ["BIPOC"],
                "technology_focus": ["General Technology"],
                "parent_organization":
                "Blacks in Technology Foundation",
                "global_org_url_from_parent_organization":
                "https://blacksintechnology.net",
            }

            asset["id"] = hash_id(name + url)
            locations.append(asset)
    return locations
Esempio n. 2
0
def get_locations():
    locations = []

    for location in location_section:
        url = location["href"]
        base_name = location.text.strip()
        city = base_name
        name = "BUILT " + city

        asset = {
            "name":
            name,
            "organization_logo":
            "https://builtinternational.org/wp-content/uploads/2020/11/INTERNATIONAL-1X.png",
            "meetup":
            url,
            "url":
            url,
            "city":
            city,
            "diversity_focus": ["BIPOC"],
            "technology_focus": ["General Technology"],
            "parent_organization":
            "Blacks United in Leading Technology International",
            "global_org_url_from_parent_organization":
            "https://builtinternational.org",
        }

        asset["id"] = hash_id(name + url)
        locations.append(asset)
    return locations
Esempio n. 3
0
def build_asset(location):
    href = location.select(".network-img-container a")[0]["href"]
    url = f"{url_root}{href}"
    base_city = location.select("h3.network-name")[0].text.lstrip("WWCode")
    region = location.select("p.network-country")[0].text

    city = f"{base_city}, {region}"
    name = "Women Who Code " + base_city
    asset = {
        "name": name,
        "organization_logo":
        "https://kjaymiller.s3-us-west-2.amazonaws.com/images/WWCode_logo_official.png",
        "city": city,
        "diversity_focus": ["Women in Tech"],
        "technology_focus": ["General Technology"],
        "parent_organization": "Women Who Code",
        "global_org_url_from_parent_organization": "https://womenwhocode.org",
    }

    asset["id"] = hash_id(name + url)

    if url:
        asset["url"] = url

    links = (location.select("h3.social-icons a"), )

    for link in links[0]:
        if link["title"] not in ["Contact", "website"]:
            asset[link["title"].split(" ")[0].lower()] = link["href"]

    return asset
Esempio n. 4
0
def get_locations():
    locations = []

    for location in base_locations_wrapper:

        name = location.select("h3")[0].text.strip()
        url = location.select("a")[0]["href"]
        city, region = location.select("strong")[0].text.strip().split("/")

        city = str(city or name).strip()

        asset = {
            "name": f"WoMakersCode - {name}",
            "url": url,
            "organization_logo":
            "https://d33wubrfki0l68.cloudfront.net/16a1903b64a4d7e982440dec57fe954c2273d95b/90edb/assets/images/womakerscode-icone.png",
            "city": f"{city}, {region}".strip(),
            "diversity_focus": ["Women in Tech"],
            "technology_focus": ["General Technology"],
            "parent_organization": "WoMakersCode",
            "global_org_url_from_parent_organization":
            "https://womakerscode.org",
        }

        asset["id"] = hash_id(name + url)
        locations.append(asset)
    return locations
Esempio n. 5
0
def build_asset(location):
    url_stem = location.select(".chapter-name a")[0]["href"]
    url = generate_url(url_stem)
    city = remove_from_city(location.text.strip())

    name_root = city.split(",")[0].strip()
    name = "PyLadies " + name_root
    logo = f"{pyl_root_url}{location.img['src'][2:]}"

    asset = {
        "name": name,
        "organization_logo": logo,
        "city": city,
        "diversity_focus": ["Women in Tech"],
        "technology_focus": ["Python"],
        "parent_organization": "PyLadies",
        "global_org_url_from_parent_organization": pyl_root_url,
    }

    asset["id"] = hash_id(name + url)

    if url:
        asset["url"] = url

    links = (location.select("h3.social-icons a"), )

    for link in links[0]:
        if link["title"] not in ["Contact", "website"]:
            asset[link["title"].split(" ")[0].lower()] = link["href"]

    return asset
Esempio n. 6
0
def get_locations():
    locations = []

    for region_group in region_wrapper:
        region = region_group.select("div.col-xs-12 p")[0].text.strip()
        region = re.sub(r"\.", "", region)
        location = region_group.find_next_sibling("div")

        while "chapter-region" not in location.get("class", ""):
            base_name = location.select("p")[0].text.strip().rstrip(":")
            city = f"{base_name}, {region}"
            links = location.select("a")
            asset = {
                "name":
                f"Women Who Go - {base_name}",
                "organization_logo":
                "http://www.womenwhogo.org/assets/images/wwglogo.png",
                "city":
                city.strip(),
                "diversity_focus": ["Women"],
                "technology_focus": ["Go"],
                "parent_organization":
                "Women Who Go",
                "global_org_url_from_parent_organization":
                "https://womenwhogo.org",
            }

            for link in links:
                url = link["href"]

                if "meetup.com" in url:
                    asset["meetup"] = url
                    asset["url"] = url
                    continue

                if "conpass.com" in url:
                    asset["meetup"] = url
                    asset["url"] = url
                    continue

                if "facebook.com" in url:
                    asset["facebook"] = url
                    continue

                if "twitter.com" in url:
                    asset["twitter"] = url
                    continue

            asset["id"] = hash_id(base_name + url)
            locations.append(asset)
            location = location.find_next_sibling("div")

            if not location:  # ran into issues where this would short-circuit
                location = {"class": "chapter-region"}

    return locations
Esempio n. 7
0
def build_asset(location):
    url = location.a["href"]
    base_city = location.a.select("div.text p") or location.a.select(
        "div.text h4")
    city = base_city[0].text
    name_root = location.a.select("div.text h4")[0].text
    name = "Girls in Tech " + name_root
    logo = f"https://kjaymiller.s3-us-west-2.amazonaws.com/images/girlsintech.jpg"

    asset = {
        "name": name,
        "organization_logo": logo,
        "city": city,
        "url": url,
        "diversity_focus": ["Women in Tech"],
        "technology_focus": ["General Technology"],
        "parent_organization": "Girls in Tech",
        "global_org_url_from_parent_organization": "https://girlsintech.com",
    }

    asset["id"] = hash_id(name + url)

    return asset