class libs.survey.page_view.image.Image(pbp_handle)

Handle images for PageView

capture(url: str)

Capture Web Page by URL

Parameters:url – URL to capture
Returns:string hashed and NumPy Array
rank(target_num_array: str)

To rank URL not registered if it same/similar to someone in trustlist.

Parameters:target_num_array – NumPy Array
Returns:URLs that similar to the target
signature(hex_digest: str)

Match PageView signature from database

Parameters:hex_digest – string hashed
Returns:URL or NoneType
class libs.survey.page_view.image.WebCapture(config: dict)

To take screenshot for PBP.

static _WebCapture__set_browser_simulation(type_id: str)

Set Browser Simulation by ID

Parameters:type_id – Type ID
Returns:class object
delete_page_image(output_image: str = 'out.png')

To delete the image of the URL you provided

Parameters:output_image – Output path (optional)
get_page_image(target_url: str, output_image: str = 'out.png')

To get the image of the URL you provided

  • target_url – The target URL
  • output_image – Output path (optional)


static image_compare(img1: removed, img2: removed)

To compare image using structural similarity index

  • img1 – Image object
  • img2 – Image object

float of the similar lever

static image_object(path: str)

Create NumPy Array

Parameters:path – The Image Path
Returns:NumPy Array
static image_object_from_b64(b64_string: bytes)

Import NumPy Array by base64

Parameters:b64_string – base64 NumPy Array dumped
Returns:NumPy Array