The author has just decided to roll their own half baked script for some reason, there are plenty of libraries to help. Python is good for scraping, I released my own library recently[1] that I think hits a sweet spot but there are many others.
Python and Ruby have their places, I wouldnt say one is clearly better than the other.