Snippets of the day – Monday, November 04, 2013

Posted on Posted in Snippets


Here are some of the most recently published snippets!

How to parse the JSON result of a jenkins job in python

This snippet shows how to get and parse the JSON format of the last execution of a Jenkins job.
You have to specify:

Jenkins_server – The Jenkins server name/IP address

http_port – The port used by Jenkins server

job_name – The job name

Open the snippet

Author:    lbottaro

How to fetch Internet Resources Using urllib2 in python

urllib2 is a Python module for fetching URLs (Uniform Resource Locators).

It offers a simple interface, based on the urlopen function.
This method is capable of fetching URLs using a variety of different protocols.

In this example you can see a specific exception handlers for HTTPError and URLError.

Open the snippet

Author:    lbottaro

Leave a Reply

Your email address will not be published. Required fields are marked *