dgtlmoon / changedetection.io

The best and simplest free open source web page change detection, website watcher, restock monitor and notification service. Restock Monitor, change detection. Designed for simplicity - Simply monitor which websites had a text change for free. Free Open source web page change detection, Website defacement monitoring, Price change notification
https://changedetection.io
Apache License 2.0
15.79k stars 883 forks source link

[feature] Get latest screenshot via API #2388

Open manasi1096 opened 1 month ago

manasi1096 commented 1 month ago

Describe the bug I'm unable to access screenshot via the API Version v0.45.23 To Reproduce Using the following function to access the content at a particular snapshot. However response only has text content, I'm unable to view the screenshot.


def get_snapshot_content(watch_id, snapshot_id):
    """Fetches the content of a specific snapshot."""
    url = f"{BASE_URL}/watch/{watch_id}/history/{snapshot_id}"
    headers = {'x-api-key': API_KEY}
    response = requests.get(url, headers=headers)
    response.raise_for_status()
    return response.text

Expected behavior I expected the response to have both screenshot, and text. I am able to view the screenshot in the UI.

Desktop (please complete the following information):

dgtlmoon commented 1 month ago

that is correct, there is no APi endpoint yet for this

should it return binary data? uuencoded data? or what?

manasi1096 commented 1 month ago

Yes, binary data would work!