module filehelper.download_urls_helper

Short summary

module pyquickhelper.filehelper.download_urls_helper

Series of functions related to folder, explore, synchronize, remove (recursively).

source on GitHub

Functions

function

truncated documentation

download_urls_in_folder_content

Iterates on files in folder, parse them, extracts all urls, download them in a folder.

Documentation

Series of functions related to folder, explore, synchronize, remove (recursively).

source on GitHub

pyquickhelper.filehelper.download_urls_helper.download_urls_in_folder_content(folder, pattern='.+[.]((py)|(ipynb))', neg_pattern=None, recursive=True, timeout=10, folder_dest=None, encoding='utf-8', raise_exception=False, chunk=None, fLOG=None)[source]

Iterates on files in folder, parse them, extracts all urls, download them in a folder.

Parameters:
  • folder – folder

  • pattern – if None, get all files, otherwise, it is a regular expression, the filename must verify (with the folder is fullname is True)

  • neg_pattern – negative pattern to exclude files

  • fullname – if True, include the subfolder while checking the regex

  • recursive – look into subfolders

  • urls – urls

  • timeout – in seconds, after this time, the function drops an returns None, -1 for forever

  • folder_dest – if None, the content is stored in that file

  • encoding – None by default, but if it is None, the returned information is binary

  • raise_exception – True to raise an exception, False to send a warnings

  • chunk – save data every chunk (only if output is not None)

  • fLOG – logging function (only applies when chunk is not None)

Returns:

list of downloaded content

source on GitHub