function npswebcam
startDate=datenum('2018-07-15','yyyy-mm-dd');
endDate=datenum('2018-07-15','yyyy-mm-dd');
cameraLocation='wash';
titleString=(strcat(cameraLocation,'_',datestr(startDate),'_',datestr(endDate)));
outHeight=750;
frameCount=0;
outputVideo=VideoWriter(strcat(titleString,'.avi'));
open(outputVideo)
pickDate=startDate;
while pickDate<=endDate
    datestr(pickDate,'yyyy-mm-dd')
    timeIntervals={'1:00%20AM','1:15%20AM','1:30%20AM','1:45%20AM','2:00%20AM','2:15%20AM','2:30%20AM','2:45%20AM','3:00%20AM','3:15%20AM','3:30%20AM','3:45%20AM','4:00%20AM','4:15%20AM','4:30%20AM','4:45%20AM','5:00%20AM','5:15%20AM','5:30%20AM','5:45%20AM','6:00%20AM','6:15%20AM','6:30%20AM','6:45%20AM','7:00%20AM','7:15%20AM','7:30%20AM','7:45%20AM','8:00%20AM','8:15%20AM','8:30%20AM','8:45%20AM','9:00%20AM','9:15%20AM','9:30%20AM','9:45%20AM','10:00%20AM','10:15%20AM','10:30%20AM','11:00%20AM','11:15%20AM','11:30%20AM','11:45%20AM','12:00%20PM','12:15%20PM','12:30%20PM','12:45%20PM','1:00%20PM','1:15%20PM','1:30%20PM','1:45%20PM','2:00%20PM','2:15%20PM','2:30%20PM','2:45%20PM','3:00%20PM','3:15%20PM','3:30%20PM','3:45%20PM','4:00%20PM','4:15%20PM','4:30%20PM','4:45%20PM','5:00%20PM','5:15%20PM','5:30%20PM','5:45%20PM','6:00%20PM','6:15%20PM','6:30%20PM','6:45%20PM','7:00%20PM','7:15%20PM','7:30%20PM','7:45%20PM','8:00%20PM','8:15%20PM','8:30%20PM','8:45%20PM','9:00%20PM','9:15%20PM','9:30%20PM','9:45%20PM','10:00%20PM','10:15%20PM','10:30%20PM','11:00%20PM','11:15%20PM','11:30%20PM','11:45%20PM','12:00%20AM','12:15%20AM','12:30%20AM','12:45%20AM'};
    monthdigits=num2str(str2num(datestr(pickDate,'mm')));
    daydigits=num2str(str2num(datestr(pickDate,'dd')));
    for z=1:size(timeIntervals,2)
        firstPagehtml=char(strcat('https://npgallery.nps.gov/AirWebCams/image?location=',cameraLocation,'&date=',monthdigits,'/',daydigits,'/',datestr(pickDate,'yyyy'),'&time=',timeIntervals(z)));%%%
        [html,status]=urlread(firstPagehtml,'Timeout',1);
        hyperlinks=regexp(html,{'GetAsset/'});
        location=hyperlinks{1};
        if(~isempty(location))
            fileID=html(location(1)+9:location(1)+44);
            firstPage=strcat('https://npgallery.nps.gov/AirWebCams/GetAsset/',fileID,'/proxy/hires');
            try
                img=imread(firstPage);
                imgresizedtemp=imresize(img,[outHeight NaN]);
                padding=(round(outHeight*(4/3))-size(imgresizedtemp,2))/2;
                imgresized=padarray(imgresizedtemp,[0,ceil(padding)]);
                if((size(imgresized,2)/2)~=round(size(imgresized,2)/2))
                    imgresized=imgresized(:,1:end-1);
                end
            writeVideo(outputVideo,imgresized);
            frameCount=frameCount+1;
            frameDate(frameCount)=pickDate;
            frameTime(frameCount)=timeIntervals(z);
            catch
            end
        end
    end
    pickDate=pickDate+1;
end
close(outputVideo)
save(strcat(titleString),'frameDate','frameTime');