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