blaablaaguy wrote:Someone needs to make a Pi Zero detector with a raspberry pi that refreshes the Pimonori page every now and again then when it detects the change of the "Out of Stock" to "In Stock" itll sound an alarm. Id make one... If i knew how.
How does anyone know how to do anything??
I think if you really wanted to make this 'Pi Zero detector' you would go ahead and do it by starting with a google search?
I will offer a little limited help, I don't really know anything about this subject so take it with a pinch of salt.
[*]First google for the term 'web scraping' and read the wikipedia page.
[*]Next decide what language you are going to use (If you don't know a language then pick python and google for some beginners guides)
[*]Write your program
The process should take about 4 or 5 hours for someone with a little programming knowledge, probably a lot longer if you have no computing knowledge.
I think I have heard that there is a library called 'beautifulsoup' that simplifiys web scraping with python try search for that.
Otherwise something as simple as a cron job running a script with wget and grep to find the relevant markup '<div>' maybe easier?
Also it maybe better to use a library if there are more complex protocols involved like if authentication or cookies are used on a site, I seem to remember that mozilla released a project that created a fully scriptable virtual web browser that allowed scripting of things such as mouseovers and flash interactions, I forget what it was called (I'm sure 20 minutes on google would give you the answer).
Go forth and create
