Webmazta
Standardized Gemini SDK to legacy google-generativeai and fixed gemini-2.5-flash compatibility
b23cb24 Download debug_apify_res.py from webmazta/contentai: direct link, hf CLI and curl.
- Browser
- Download file 841 Bytes
-
https://huggingface.co/spaces/webmazta/contentai/resolve/main/debug_apify_res.py
- Command line
-
hf download hf://spaces/webmazta/contentai/debug_apify_res.py
-
curl -L -o debug_apify_res.py https://huggingface.co/spaces/webmazta/contentai/resolve/main/debug_apify_res.py
841 Bytes
| from apify_client import ApifyClient | |
| import json | |
| client = ApifyClient("apify_api_fKPm5qA9w1u7Gy00uWdJenHks0mCvj2rFeg5") | |
| # Try with RESIDENTIAL proxies | |
| run_input = { | |
| "directUrls": ["https://www.instagram.com/p/DVgO7VqlbyC/"], | |
| "resultsType": "details", | |
| "proxyConfiguration": { | |
| "useApifyProxy": True, | |
| "apifyProxyGroups": ["RESIDENTIAL"] | |
| } | |
| } | |
| print("Running Apify Actor apify/instagram-scraper WITH RESIDENTIAL PROXIES...") | |
| run = client.actor("apify/instagram-scraper").call(run_input=run_input) | |
| print("Fetching results...") | |
| items = list(client.dataset(run["defaultDatasetId"]).iterate_items()) | |
| if items: | |
| with open("apify_debug_res.json", "w", encoding="utf-8") as f: | |
| json.dump(items[0], f, indent=2) | |
| print("Saved results to apify_debug_res.json") | |
| else: | |
| print("No items found in dataset.") | |