Added a User-Agent header and added a forloop in the main