diff --git a/docs/_static/.DS_Store b/docs/_static/.DS_Store new file mode 100644 index 00000000..12e84d13 Binary files /dev/null and b/docs/_static/.DS_Store differ diff --git a/docs/arguments.rst b/docs/arguments.rst index f3d7bcad..e18035c9 100644 --- a/docs/arguments.rst +++ b/docs/arguments.rst @@ -2,6 +2,10 @@ Input Arguments =============== +Link to `GitHub repo `__ + +Link to `Documentation Homepage `__ + +-------------------+-------------+-------------------------------------------------------------------------------------------------------------------------------+ | Argument | Short hand | Description | +===================+=============+===============================================================================================================================+ @@ -235,6 +239,10 @@ Input Arguments | | | | | | | This argument will override all the other print arguments (like print_urls, print_size, etc.) | +-------------------+-------------+-------------------------------------------------------------------------------------------------------------------------------+ +| ignore_urls | iu | Skip downloading of images whose urls contain certain strings such as wikipedia.org | +| | | | +| | | This argument takes a delimited set of values e.g. wikipedia.org,wikimedia.org | ++-------------------+-------------+-------------------------------------------------------------------------------------------------------------------------------+ | help | h | show the help message regarding the usage of the above arguments | +-------------------+-------------+-------------------------------------------------------------------------------------------------------------------------------+ diff --git a/docs/examples.rst b/docs/examples.rst index 87f6e585..24b47b73 100644 --- a/docs/examples.rst +++ b/docs/examples.rst @@ -2,6 +2,12 @@ Examples ======== +Link to `GitHub repo `__ + +Link to `Documentation Homepage `__ + +Link to `Input arguments or parameters `__ + Config File Format ================== @@ -31,8 +37,8 @@ download images based on arguments passed. } -Command line examples -===================== +Code sample - Importing the library +=================================== - If you are calling this library from another python file, below is the sample code @@ -46,6 +52,10 @@ Command line examples paths = response.download(arguments) #passing the arguments to the function print(paths) #printing absolute paths of the downloaded images + +Command line examples +===================== + - If you are passing arguments from a config file, simply pass the config_file argument with name of your JSON file .. code-block:: bash diff --git a/docs/index.rst b/docs/index.rst index 6f32a432..3e276d00 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -2,6 +2,8 @@ Google Images Download ====================== +Link to `GitHub repo `__ + .. index:: Summary Summary diff --git a/docs/installation.rst b/docs/installation.rst index 0e1362f5..457f3ef0 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -2,6 +2,8 @@ Installation ============ +Link to `Documentation Homepage `__ + You can use **one of the below methods** to download and use this repository. Install using pip diff --git a/docs/structure.rst b/docs/structure.rst index 77e93faf..8e142fde 100644 --- a/docs/structure.rst +++ b/docs/structure.rst @@ -2,6 +2,10 @@ Workflow ======== +Link to `GitHub repo `__ + +Link to `Documentation Homepage `__ + Below diagram represents the algorithm logic to download images. .. figure:: http://www.zseries.in/flow-chart.png diff --git a/docs/troubleshooting.rst b/docs/troubleshooting.rst index 4e48e979..05e0aee6 100644 --- a/docs/troubleshooting.rst +++ b/docs/troubleshooting.rst @@ -2,6 +2,10 @@ Troubleshooting Errors/Issues ============================= +Link to `GitHub repo `__ + +Link to `Documentation Homepage `__ + SSL Errors ========== @@ -75,3 +79,16 @@ For **All the operating systems** you will have to use '--chromedriver' or '-cd' chromedriver that you have downloaded in your machine. If on any rare occasion the chromedriver does not work for you, try downgrading it to a lower version. + + +urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] +============================================== + +`Reference to this issue `__ + +Use the below command to install the SSL certificate on your machine. + +.. code-block:: bash + + cd /Applications/Python\ 3.7/ + ./Install\ Certificates.command diff --git a/docs/usage.rst b/docs/usage.rst index 38197628..a190167b 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -2,6 +2,10 @@ Usage ===== +Link to `GitHub repo `__ + +Link to `Documentation Homepage `__ + Using the library from Command Line Interface ============================================= diff --git a/google_images_download/google_images_download.py b/google_images_download/google_images_download.py index 84b055a9..fd89a3a9 100755 --- a/google_images_download/google_images_download.py +++ b/google_images_download/google_images_download.py @@ -507,7 +507,7 @@ def create_directories(self,main_directory, dir_name,thumbnail,thumbnail_only): return - # Download Images + # Download Image thumbnails def download_image_thumbnail(self,image_url,main_directory,dir_name,return_image_name,print_urls,socket_timeout,print_size,no_download,save_source,img_src,ignore_urls): if print_urls or no_download: print("Image URL: " + image_url) @@ -576,14 +576,14 @@ def download_image_thumbnail(self,image_url,main_directory,dir_name,return_image # Download Images def download_image(self,image_url,image_format,main_directory,dir_name,count,print_urls,socket_timeout,prefix,print_size,no_numbering,no_download,save_source,img_src,silent_mode,thumbnail_only,format,ignore_urls): + if not silent_mode: + if print_urls or no_download: + print("Image URL: " + image_url) if ignore_urls: if any(url in image_url for url in ignore_urls.split(',')): - return "fail","Image ignored",None,None + return "fail", "Image ignored due to 'ignore url' parameter", None, image_url if thumbnail_only: return "success", "Skipping image download...", str(image_url[(image_url.rfind('/')) + 1:]), image_url - if not silent_mode: - if print_urls or no_download: - print("Image URL: " + image_url) if no_download: return "success","Printed url without downloading",None,image_url try: diff --git a/setup.py b/setup.py index 0a5d682b..e0d8c80c 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from codecs import open from os import path -__version__ = '2.7.0' +__version__ = '2.8.0' here = path.abspath(path.dirname(__file__))