Commit 5aa4e916 authored by Michael Bailey's avatar Michael Bailey

Add preliminary regex to dynamically collect the locations. In the immediate...

Add preliminary regex to dynamically collect the locations. In the immediate future I intend to make this a usable format like an array.
parent 81237827
# We don't actually use bs4 yet but I'm sure we will
from bs4 import BeautifulSoup
import requests
import re
# Collect the HTML of the laundry page so we can parse it
r = requests.get('https://housing.gmu.edu/laundry')
# Don't just assume the site doesn't time out or shit itself
if r.status_code == 200:
# Isolate Speedqueen URLS
for location in re.findall('(?<=quantum\.speedqueen\.com\/wa\/)(.*)(?=\" )',r.text):
# Print Location name
print location
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment