So "back in the day" when I was an undergrad at MIT I signed up for every mailing list I could get myself onto and then trained a Bayesian spam filter to recognize free food emails. I threw all free-food e-mails in a freshly-untrained spam box and sure enough, after a few hundred e-mails it kept putting free food e-mails in one folder which was extremely convenient. Spamicity (i.e. free-food-icity) for phrases like "bring spoon" and "thesis defense" were particularly high.
I've been wanting to make my students do, as a side project, a free-food searcher for Stanford. Wouldn't have to be hard at all: Download (or even wget) the CS/Engineering calendar, do the minimal scraping needed to figure out if the words "food", "meal", "dinner", "will be served" "refreshments" appear anywhere in the text, then return True.<p>That's the main thing, the rest is just gravy: returning the event serialized as JSON/CSV (event name, date/time, URL) to be used in a web app or notification system -- so a simple web scraper can lead to exploring web dev (even just a simple Flask app) or fun APIs like AWS SNS and Twilio. You could even fit in a good "cache invalidation is a hard problem" lesson.<p>I never get around to assigning it because most people don't think of it as "serious work". Also, I'm afraid the CS dept. will obfuscate their calendar if random people start showing to things for free food. But I keep telling students, the only/best way to learn coding is to do something that directly affects your life or your bottom-line. It's the best way to put constraints on a project, i.e. think of things as the MVP that improves your life.<p>I learned Ruby and Ruby on Rails much faster than I had any right to, when my new job in NYC required it. I practiced not by writing Ruby on the job, but writing Ruby to scrape Craigslist apartment listings and feeding them into a spreadsheet.<p>I've thought about creating "personal data/programming projects"...in which the data comes from the student. Such as the SQLite that stores their Chrome/Firefox/Safari history. Or the parseable HTML dump that Facebook gives you when you request your records. Or your Twitter data dump. Or your Google search history.<p>But I've been reticent to do this. Partly because it's not a guarantee that every student uses Google or Facebook or has an Instagram. And partly because I'm deeply paranoid students (especially those who are novices about programming and operating systems) will accidentally upload or otherwise expose this sensitive data dump.
I wonder how do those "free food" promotions make sense, business-wise. As this article shows, by doing such promotion you hit a completely different (and useless for you) clientbase - people just waiting for the promotions. This feel similar to the way most people seem to use Groupon - they're interested in using what's currently on big discount, and they won't be coming back to a place when it's on its regular pricing.
Great read that shows how web scarping can easily be utilised in a meaningful way.<p>However, doesn't this script either send out the same text very often, or potentially send it out too late (by e.g. only letting the cronjob run every 6 hours)?<p>I assume that time is of the essence in this situation. Some sort of log on sent texts would surely be helpful.
Cool project. I do something similar for the daily free ebook from Packt. Also for when new episodes of Silicon Valley are posted.<p>Tiny detail - you can do the regex match case insensitive and avoid the call to lower() for every string.<p><pre><code> re.match(..., re.I)</code></pre>
I wonder how difficult would it be to do this with cloud services, I mean to scrape voucher codes for free credit. For instance when Digital Ocean announces some promo and you can get 10 USD worth of credit.<p>There are some sites that allegedly publish coupons, but I feel like a dummy only scrolling through those, it's full of ads and crap.<p>What would be the proper channels to scrape for promo codes of the cloud providers? Twitter feeds, something else?
If you're interested in free food, I recommend checking out www.freefoodguy.com. He's a blogger who's sole mission in life seems to be finding free food deals and sharing them via his email list.
Regarding free food you could also try natched:<p><a href="https://natched.com" rel="nofollow">https://natched.com</a><p>Disclaimer: I helped building this.
This automation will increase the consumption of free food offers by removing friction. Restaurants will not make money on their promotions, since the script users will only consume the free food in their local market. Restaurants will stop using free food promotions. ;-D
<a href="https://gist.github.com/mseshachalam/b57907a37763532917fc2ca79e4d5b77" rel="nofollow">https://gist.github.com/mseshachalam/b57907a37763532917fc2ca...</a><p>cloudflare captcha is blocking me to test this.
Haha, very nice. I think this might works with <a href="https://www.groupon.com/" rel="nofollow">https://www.groupon.com/</a> too.
i dunno how well this would work in practice, in my experience signing up for promotional email results in tons of junk emails with actual deals only offered occasionally. It'd be hard to parse out real value