Hello,
i can update your script to meet your requirements. Am i right to assume your script is running under Linux? If so, 1) would need a simple cronjob. If i get 2) right, this would require some web automation with Selenium, which i know quite well. 3) sounds fairly trivial to me.
If you'e interested, drop me a message so we can talk about this in detail.
Best,
Jo Bergs