Setting up a custom alert system for changes to a URL
Suppose your business needs to be alerted when a competitor posts to their public Facebook page. Specifically, they've asked you to alert them whenever a new post (of any type) is created by the page. You've tried to get notifications working, but it seems FB has implemented algorithms that often suppress page push notifications despite turning them on.
Given this problem statement, implement a simple program that will check a Facebook page url every few minutes and print out when a new post has been created (of course instead of printing we'd probably want a text/email, but for the purposes of this question we'll keep it simple). You can use the following page as an example -- note that it's accessible even without a Facebook account.
In an interview scenario you may only be asked hypothetically how you might set up such a system, and what potential pitfalls to look out for, but implementing this short function is good practice. Additionally, you may find this personally useful for monitoring specific site changes, since the structure can apply to any URL.
Subscribe to premium account to see the solution.Get premium now