LSEG Data Library for Python

get_data

This method sends a request to the Delivery Platform (formerly Refinitiv Data Platform) to retrieve the data specified in the news.images.Definition object.

Module

lseg.data.content.news.images

Syntax

get_data(sesson, on_response, on_page_response)

Parameters

Value Description Data type Optional Default value
session Session object. If session parameters are not defined, the default session will be used. Session object Yes None
on_response User-defined callback function to process the final response containing all requested headlines. Callable Yes None
on_page_response User-defined callback function to process the intermediate responses for long lists of headlines returned page by page. Callable Yes None

Returned value

Images response

Usage

The following example demonstrates how to retrieve the particular image and save it:

response = news.images.Definition(image_id="2023-04-19T170847Z_1_DN1_RTRLXPP_2_LYNXPACKAGER__JPG", height=200, width=200)

image = response.data.image
image.save()

None

101 words (0:32 mins)