Create a screenshot from list of URL


I am trying to create AppleScript, which will do a screenshot of a web page from a list of URL. Given URL is following:,blabla
where 2015-02-23 is a date, 18 is an hour I need to create a screenshot of 100 consequent days at the same time.

First approach:

  1. open file read all URLs and create a variable
  2. open a window with a first URL
  3. do javascript which will disable certain function of the website
  4. create a screenshot
  5. repeat step 2 with other URL
  6. if there is no other URL stop

Second approach:

  1. substitute months and dates [2015-02-23] with variables
  2. do repeat of open window with URL which includes first variable set
  3. do java script to disable some function of the URL
  4. create a screenshot
  5. do 2. with the second variable
  6. stop at 2016-08-31

I was working on the first approach and I got stacked at opening list of variables.

My code so far is following:

set myList to every paragraph of (read "/Users/tomas/desktop/sites.txt")
set numURLs to (count myList)
set tot to count numURLs

repeat with i from 1 to tot
	set p to item i of tot
	tell application "Google Chrome"
		make new window
		set URL of active tab of window 1 to p
		execute front window's active tab javascript "document.getElementById('menu').style.display = 'none';"
		delay 1
		do shell script "date=$(date '+%m%dT%H%M%S'); screencapture -x -R0,102,1500,500 ~/Desktop/Windyty${date}$.jpg"
	end tell
end repeat

Can someone help me with this?

Thank you


Model: MacBook Pro (15-inch, Late 2008)
AppleScript: Version 2.8.1 (183.1)
Browser: Safari 601.6.17
Operating System: Mac OS X (10.10)