(
        self, path, since=None, camera="all", stop=10, delay=1, debug=False
    )
Download all videos from server since specified time.

        :param path: Path to write files.  /path/<cameraname>_<recorddate>.mp4
        :param since: Date and time to get videos from.
                      Ex: "2018/07/28 12:33:00" to retrieve videos since
                      July 28th 2018 at 12:33:00
        :param camera: Camera name to retrieve.  Defaults to "all".
                       Use a list for multiple cameras.
        :param stop: Page to stop on (~25 items per page. Default page 10).
        :param delay: Number of seconds to wait in between subsequent video downloads.
        :param debug: Set to TRUE to prevent downloading of items.
                      Instead of downloading, entries will be printed to log.
Download all videos from server since specified time.
Download all videos from server since specified time .
def download_videos(
        self, path, since=None, camera="all", stop=10, delay=1, debug=False
    ):
        """
        Download all videos from server since specified time.

        :param path: Path to write files.  /path/<cameraname>_<recorddate>.mp4
        :param since: Date and time to get videos from.
                      Ex: "2018/07/28 12:33:00" to retrieve videos since
                      July 28th 2018 at 12:33:00
        :param camera: Camera name to retrieve.  Defaults to "all".
                       Use a list for multiple cameras.
        :param stop: Page to stop on (~25 items per page. Default page 10).
        :param delay: Number of seconds to wait in between subsequent video downloads.
        :param debug: Set to TRUE to prevent downloading of items.
                      Instead of downloading, entries will be printed to log.
        """
        if since is None:
            since_epochs = self.last_refresh
        else:
            parsed_datetime = parse(since, fuzzy=True)
            since_epochs = parsed_datetime.timestamp()

        formatted_date = util.get_time(time_to_convert=since_epochs)
        _LOGGER.info("Retrieving videos since %s", formatted_date)

        if not isinstance(camera, list):
            camera = [camera]

        for page in range(1, stop):
            response = api.request_videos(self, time=since_epochs, page=page)
            _LOGGER.debug("Processing page %s", page)
            try:
                result = response["media"]
                if not result:
                    raise KeyError
            except (KeyError, TypeError):
                _LOGGER.info("No videos found on page %s. Exiting.", page)
                break

            self._parse_downloaded_items(result, camera, path, delay, debug)
def download_videos ( self , path , since = None , camera = "all" , stop = 10 , delay = 1 , debug = False ) : if since is None : since_epochs = self . last_refresh else : parsed_datetime = parse ( since , fuzzy = True ) since_epochs = parsed_datetime . timestamp ( ) formatted_date = util . get_time ( time_to_convert = since_epochs ) _LOGGER . info ( "Retrieving videos since %s" , formatted_date ) if not isinstance ( camera , list ) : camera = [ camera ] for page in range ( 1 , stop ) : response = api . request_videos ( self , time = since_epochs , page = page ) _LOGGER . debug ( "Processing page %s" , page ) try : result = response [ "media" ] if not result : raise KeyError except ( KeyError , TypeError ) : _LOGGER . info ( "No videos found on page %s. Exiting." , page ) break self . _parse_downloaded_items ( result , camera , path , delay , debug )