-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Including report date / avoiding repeated notification #1
Comments
Sorry for the slow response. I think my notifications were turned off somehow. Anyways I think you are talking about this report date: While it is posted above the "Donohue Exit Quota and Trailhead Space Available" section, I presume it refers to the date the remaining data on the webpage was updated on? I'm happy to make this addition... shouldn't be too hard. |
Currently, the date shown in the message is from the HTTP header: Line 74 in 4f7ae38
You can see the headers that get returned using
I believe this I like that idea that we should default to using the date from report date, and only provide this date if that field cannot be found. |
@neuhoffm see if 8ac9f7d implements your suggestion? Hackjohn now uses "Report Date" for the date in the message. There is also a |
All good! I was mainly thinking it could be cool to check if the report has been updated since the last time the script ran and then either do or don't send a notification based off of that if people wanted. I talked to the reservation office and they're updating the report very sporadically now so unfortunately the 11am M-F isn't a guarantee anymore.
|
It would be great if we could send only one notification per report date. This would require some sort of memory (persistence data between runs), which currently does not exist. Something to keep in mind, because it would prevent annoying over-notification.
Wow so the report hasn't been updated in 15 days. That is a real bummer. When you call, do they look through their internal systems to see the latest reservation info? Basically, I'm curious whether this change makes it so you just need to call them periodically to get any up to date information. Or is their internal information now only updated infrequently? |
I see the website says:
I think "top right of the data" must refer to "Report Date", although this is on the left. |
I have thought of another solution. We could have a setting to only notify about vacancies in reports less than @neuhoffm would this address your issue? |
That could work, are you worried about it persisting the date the last run pulled to a text file? Although the page only provides a date and not a time so our need for precision is much less. With the page being updated sporadically, I've set the script to run every couple of minutes, I'm trying to figure out if the days_until_stale property would work with that frequency. Thanks for looking into this!
|
I wanted to avoid writing files, but I think that is the simplest (and only robust solution). @neuhoffm check out the changes in fbc511e. See if this works for you? The program now defaults to writing a file to
Got it. From my recent memory, the report was updated on April 3, April 19, and April 22. That two-week gap is scary, but hopefully they stick to the every-other-day frequency or so. Note that it is possible for sites to rate limit a specific IP address or completely block it for making too many requests. Probably not a big risk here, but who knows. |
Looks great! I'll pull down latest and add a PR to support IFTTT if people want to use that instead of middle man |
That would be a useful additional, I imagine (have never used IFTTT myself). |
Is there a way to include the report date in the message that gets sent out? It looks like the report isn't updated very consistently and I'd like to include the report date in the message. There doesn't seem to be a specific css class associated with the report date span but it is the only occurrence of the "Report Date:" string in the file. Python isn't my strong suit or I'd add a PR for this feature.
The text was updated successfully, but these errors were encountered: