https://github.com/davidbradway/csupdate
Example repository to scrape a webpage and send a notification. CityStrides does this automatically now, but this is a useful template.
https://github.com/davidbradway/csupdate
beautifulsoup4 citystrides openstreetmap-data pushbullet requests
Last synced: 23 days ago
JSON representation
Example repository to scrape a webpage and send a notification. CityStrides does this automatically now, but this is a useful template.
- Host: GitHub
- URL: https://github.com/davidbradway/csupdate
- Owner: davidbradway
- Created: 2021-05-17T18:14:51.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-05-19T20:03:46.000Z (over 4 years ago)
- Last Synced: 2025-04-14T09:49:54.892Z (6 months ago)
- Topics: beautifulsoup4, citystrides, openstreetmap-data, pushbullet, requests
- Language: Python
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# csupdate
This repository and Python script watches for changes on a CityStrides city of one's choosing.
Setup
```
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
pip install --upgrade pip
```Configure
```
vi config.py
# add your Pushbullet key, if notifications are desired
# add the url for your CityStrides city
# we shouldn't have to change the target_class unless the website changes
```Test at the Terminal
```
# make sure you activate venv first
python scrape.py
python scrape.py
```Add repeating script run to Crontab
```
crontab -e*/10 * * * * cd /getlab/dpb6/repos/csupdate && /getlab/dpb6/repos/csupdate/venv/bin/python /getlab/dpb6/repos/csupdate/scrape.py
```