1. Accept an argument containing the search keyword for the video (
query), and also set the parameters page, per_page, orientation with default values:def execute(self, query, page=1, per_page=10, orientation='portrait'):2. Form the endpoint path:
endpoint = 'https://api.pexels.com/videos/search'Alternatively, set it as an object attribute:
self.endpoint.3. Create a dictionary with parameters:
params = {'query': query, 'page': page, 'per_page': per_page, 'orientation': orientation}4. Send a request to the target endpoint by calling the
make_request method and passing the endpoint and parameters.5. Obtain the JSON response from the request.
6. Extract video links from the JSON response.
7. Save several videos in the folder for the 3rd or 4th scene of the script.
