Tools to Capture and Convert the Web

GrabzIt Client with Python

Python API

Description

This class handles all communication with the GrabzIt screenshot web services.

Public Methods

GetResult(id)

This method returns the screenshot itself. If nothing is returned then something has gone wrong or the screenshot is not ready yet.

Parameters

Return Value

The capture


URLToAnimation(url, options = None)

Specifiy the URL of the online video that should be converted into a animated GIF.

Parameters

Return Value

void

GrabzItAnimationOptions

The class represents all of the options available when creating an animated GIF.

Attributes


URLToImage(url, options = None)

Specifies the URL that should be converted into a image screenshot.

Parameters

Return Value

void

HTMLToImage(html, options = None)

Specifies the HTML that should be converted into a image.

Parameters

Return Value

void

FileToImage(path, options = None)

Specifies a HTML file that should be converted into a image.

Parameters

Return Value

void

GrabzItImageOptions

The class represents all of the options available when creating image captures.

Attributes

Methods


URLToVideo(url, options = None)

Specifies the URL that should be converted into a video.

Parameters

Return Value

void

HTMLToVideo(html, options = None)

Specifies the HTML that the video should be captured from.

Parameters

Return Value

void

FileToVideo(path, options = None)

Specifies a HTML file that should be converted into a video.

Parameters

Return Value

void

VideoOptions

The class represents all of the options available when creating a video of a webpage.

Public Properties

Public Methods


URLToRenderedHTML(url, options = None)

Specifies the URL that should be converted into rendered HTML.

Parameters

Return Value

void

HTMLToRenderedHTML(html, options = None)

Specifies the HTML that should be converted into rendered HTML.

Parameters

Return Value

void

FileToRenderedHTML(path, options = None)

Specifies a HTML file that should be converted into rendered HTML.

Parameters

Return Value

void

GrabzItHTMLOptions

The class represents all of the options available when creating rendered HTML captures.

Attributes

Methods


URLToPDF(url, options = None)

Specifies the URL that should be converted into a PDF.

Parameters

Return Value

void

HTMLToPDF(html, options = None)

Specifies the HTML that should be converted into a PDF.

Parameters

Return Value

void

FileToPDF(path, options = None)

Specifies a HTML file that should be converted into a PDF.

Parameters

Return Value

void

GrabzItPDFOptions

The class represents all of the options available when creating PDF captures.

Attributes

Methods


URLToDOCX(url, options = None)

Specifies the URL that should be converted into a DOCX.

Parameters

Return Value

void

HTMLToDOCX(html, options = None)

Specifies the HTML that should be converted into a DOCX.

Parameters

Return Value

void

FileToDOCX(path, options = None)

Specifies a HTML file that should be converted into a DOCX.

Parameters

Return Value

void

GrabzItDOCXOptions

The class represents all of the options available when creating DOCX captures.

Attributes

Methods


URLToTable(url, options = None)

Specifies the URL that the HTML tables should be extracted from.

Parameters

Return Value

void

HTMLToTable(html, options = None)

Specifies the HTML that the HTML tables should be extracted from.

Parameters

Return Value

void

FileToTable(path, options = None)

Specifies a HTML file that the HTML tables should be extracted from.

Parameters

Return Value

void

GrabzItTableOptions

The class represents all of the options available when converting HTML tables to CSV, XLSX or JSON.

Attributes

Methods


This is the recommended method of saving a file

Save(callBackURL = '')

Save the result asynchronously and returns a unique identifier, which can be used to get the screenshot with the GetResult method.

Parameters

Return Value

The unique identifier of the screenshot otherwise if a error has occured an exception is thrown. This can be used to get the screenshot with the GetResult method


Warning this method is synchronous so will cause a application to pause while the result is processed

SaveTo()

Save the result synchronously to a variable containing the screenshot byte data.

Return Value

returns the byte data of the file if successful otherwise it throws an exception.


Warning this method is synchronous so will cause a application to pause while the result is processed

SaveTo(saveToFile)

Save the result synchronously to a file.

Parameters

Return Value

returns the true if it is successful otherwise it throws an exception.


GetStatus(id)

Get the current status of a GrabzIt screenshot.

Parameters

Return Value

ScreenShotStatus object


GetCookies(domain)

Get all the cookies that GrabzIt is using for a particular domain. This may include user defined cookies as well.

Parameters

Return Value

GrabzItCookie array


SetCookie(name, domain, value = "", path = "/", httponly = False, expires = "")

Sets a new custom cookie on GrabzIt, if the custom cookie has the same name and domain as a global cookie the global cookie is overridden.

This can be useful if a websites functionality is controlled by cookies.

Parameters

Return Value

True if the cookie is successfully set, otherwise false


DeleteCookie(name, domain)

Delete a custom cookie or block a global cookie from being used

Parameters

Return Value

True if the cookie is successfully deleted, otherwise false


GetWaterMarks()

Get your uploaded custom watermarks

Return Value

GrabzItWaterMark array


GetWaterMark(identifier)

Return your custom watermarks that matches the specified identifier

Parameters

Return Value

GrabzItWaterMark


AddWaterMark(identifier, path, xpos, ypos)

Add a new custom watermark

Parameters

Return Value

returns true if the watermark was successfully set


DeleteWaterMark(identifier)

Delete a custom watermark

Parameters

Return Value

returns true if the watermark was successfully deleted


SetLocalProxy(proxyUrl)

This method enables a local proxy server to be used for all requests.

Parameters


UseSSL

Specifies if requests to GrabzIt's API should use SSL

Parameters


CreateEncryptionKey()

Create a cryptographically secure base 64 encryption key, 44 characters long.


Decrypt(data, key)

Decrypt an encrypted capture using the provided encryption key.

Parameters


DecryptFile(path, key)

Decrypt an encrypted capture using the provided encryption key.

Parameters


Result Classes

GrabzItCookie

Public Properties

ScreenShotStatus

The class representing the current status of the screenshot.

Public Properties

GrabzItWaterMark

This class represents the custom watermarks stored in GrabzIt

Public Properties