Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ jobs:
docker run --rm --env-file uplift.env -v ./certs:/usr/src/app/certs cornellappdev/uplift-dev:$IMAGE_TAG flask --app migrations db upgrade
sudo systemctl restart nginx
docker stack deploy -c docker-compose.yml the-stack --with-registry-auth
docker system prune -f
yes | docker system prune -a
2 changes: 1 addition & 1 deletion .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ jobs:
docker run --rm --env-file uplift.env -v ./certs:/usr/src/app/certs cornellappdev/uplift-prod:$IMAGE_TAG flask --app migrations db upgrade
sudo systemctl restart nginx
docker stack deploy -c docker-compose.yml the-stack --with-registry-auth
docker system prune -f
yes | docker system prune -a
10 changes: 5 additions & 5 deletions src/scrapers/equipment_scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,12 @@ def process_equip_page(page, fit_center):
create_equip(equip[1], fit_center_id, fit_center)
else:
body = table.find_all("tr")
for even_row in range(0, len(body), 2):
muscle_groups = body[even_row].find_all("th")
equip = body[even_row + 1].find_all("td")
if muscle_groups[0].text:
header_rows = [r.find_all("th") for r in body if r.find_all("th")]
data_rows = [r.find_all("td") for r in body if r.find_all("td")]
for muscle_groups, equip in zip(header_rows, data_rows):
if len(muscle_groups) > 0 and len(equip) > 0 and muscle_groups[0].text:
create_equip(equip[0], fit_center_id, fit_center)
if muscle_groups[1].text:
if len(muscle_groups) > 1 and len(equip) > 1 and muscle_groups[1].text:
create_equip(equip[1], fit_center_id, fit_center)


Expand Down
Loading