←back to thread

1901 points l2silver | 6 comments | | HN request time: 0.482s | source | bottom

Maybe you've created your own AR program for wearables that shows the definition of a word when you highlight it IRL, or you've built a personal calendar app for your family to display on a monitor in the kitchen. Whatever it is, I'd love to hear it.
1. actionfromafar ◴[] No.35739396[source]
My wife has her work schedule in a mobile web app, but the app is really bad. Turns out the app is just a wrapper around a web site.

So I made a KVM instance which does one thing - login automatically, start Firefox, login with Selenium, then uses some kind of other Python desktop control contraption to press CTRL-S, tab-tab, save the web page to the Downloads folder.

Then, the python program proceeds to parse the HTML (with BeautifulSoup), extract the schedule times from how they are showed in some <div> or other (super weird ugly text format). Checks for changes over time and emails her what has changed. (So she gets a notice when her schedule changes and she doesn't have to periodically check in with the app.)

Finally converts the schedule to calendar format and publishes on a web site so the schedule can also be seen in the phone calendar.

replies(3): >>35739406 #>>35750142 #>>35756548 #
2. supahfly_remix ◴[] No.35739406[source]
That's cool! What library/software did you get the instance to email?
replies(1): >>35739413 #
3. actionfromafar ◴[] No.35739413[source]
Python has a built-in SMTP client, which I connected to my regular email account. So the emails are "coming from me".
4. cdaringe ◴[] No.35750142[source]
Ive also done this for similar purposes . Scrape parse map reduce over garbage web apps. Good on ya
5. toyg ◴[] No.35756548[source]
In similar vein: my local recycling collection is different from week to week (i.e. paper one week, plastic the next, etc). It's supposed to be on a fixed yearly schedule, but during COVID lockdowns the schedule changed dramatically, often day by day. There is a website that will tell you the most recent plan, but you can't just bookmark it - every time you have to specify the address and the date, which is annoying.

So I built a scraping script in python that runs once a day and sends me an email the evening before a collection is due, telling me what I should place outside that day. It's been working great for three years now, with zero maintenance.

I considered turning it into a public service, but i don't want any pressure from neighbors when things eventually break (as they will, inevitably, sooner or later). And really this should be a basic feature offered by the local authority website, so I hope they'll implement it one day on their own.

replies(1): >>35756984 #
6. actionfromafar ◴[] No.35756984[source]
Maybe you could put a web service anonymously. A dirty paper with a QR code on. You have nothing to do with it, of course.