Webmazta
Standardized Gemini SDK to legacy google-generativeai and fixed gemini-2.5-flash compatibility
b23cb24 Download debug_apify_media.py from webmazta/contentai: direct link, hf CLI and curl.
- Browser
- Download file 806 Bytes
-
https://huggingface.co/spaces/webmazta/contentai/resolve/main/debug_apify_media.py
- Command line
-
hf download hf://spaces/webmazta/contentai/debug_apify_media.py
-
curl -L -o debug_apify_media.py https://huggingface.co/spaces/webmazta/contentai/resolve/main/debug_apify_media.py
806 Bytes
| from apify_client import ApifyClient | |
| import json | |
| client = ApifyClient("apify_api_fKPm5qA9w1u7Gy00uWdJenHks0mCvj2rFeg5") | |
| # Try a different actor specifically for downloading | |
| run_input = { | |
| "url": "https://www.instagram.com/p/DVgO7VqlbyC/" | |
| } | |
| print("Running Apify Actor apify/instagram-media-downloader...") | |
| try: | |
| run = client.actor("apify/instagram-media-downloader").call(run_input=run_input) | |
| print("Fetching results...") | |
| items = list(client.dataset(run["defaultDatasetId"]).iterate_items()) | |
| if items: | |
| with open("apify_debug_media.json", "w", encoding="utf-8") as f: | |
| json.dump(items[0], f, indent=2) | |
| print("Saved results to apify_debug_media.json") | |
| else: | |
| print("No items found in dataset.") | |
| except Exception as e: | |
| print(f"Actor failed: {e}") | |