Spaces:
Running
Running
| # 🔴 ISSUE: 404 NOT FOUND on Hugging Face | |
| ## Why You're Getting 404 | |
| Your Hugging Face Space (`ubuntu593-alt-scraper-api.hf.space`) is running **OLD CODE** that doesn't support query parameters yet. | |
| The fix I made is only in your **GitHub repo** - it needs to be **deployed to Hugging Face**. | |
| --- | |
| ## ✅ SOLUTION 1: Redeploy to Hugging Face (Recommended) | |
| ### Option A: Auto-Sync from GitHub | |
| If your HF Space is linked to GitHub: | |
| 1. Go to: https://huggingface.co/spaces/ubuntu593/alt-scraper-api/settings | |
| 2. Click **"Factory Reboot"** or **"Sync from GitHub"** | |
| 3. Wait 2-3 minutes for rebuild | |
| 4. Try your Postman request again | |
| ### Option B: Manual Push | |
| ```bash | |
| cd d:\webscreper | |
| git push | |
| ``` | |
| Then in Hugging Face: | |
| 1. Go to your Space settings | |
| 2. Pull latest changes or trigger rebuild | |
| --- | |
| ## ✅ SOLUTION 2: Test Locally First | |
| ### Test on Your Local Server (Port 7860) | |
| **Change your Postman URL to:** | |
| ``` | |
| http://127.0.0.1:7860/api/scanstart?domain=https://wpengine.com/&limit=26 | |
| ``` | |
| Keep everything else the same (Params tab with domain and limit). | |
| **This will work immediately** because your local server has the updated code! | |
| --- | |
| ## ✅ SOLUTION 3: Use JSON Body (Works on Current HF Deployment) | |
| If you can't redeploy right now, use this method that works with the old code: | |
| ### Postman Configuration: | |
| 1. **URL**: `https://ubuntu593-alt-scraper-api.hf.space/api/scanstart` | |
| - ⚠️ **REMOVE the query string** (`?domain=...&limit=...`) | |
| 2. **Method**: POST | |
| 3. **Params Tab**: | |
| - ❌ **UNCHECK or DELETE** all parameters | |
| 4. **Body Tab**: | |
| - Select `raw` | |
| - Select `JSON` from dropdown | |
| - Paste: | |
| ```json | |
| { | |
| "domain": "https://wpengine.com/", | |
| "limit": 26 | |
| } | |
| ``` | |
| 5. **Headers Tab** (auto-added): | |
| - `Content-Type: application/json` | |
| 6. Click **Send** | |
| --- | |
| ## 🎯 Quick Test: Which Method to Use? | |
| | Method | Works on Local (127.0.0.1:7860) | Works on HF (before redeploy) | Works on HF (after redeploy) | | |
| |--------|-------------------------------|-------------------------------|------------------------------| | |
| | **Query Params** (`?domain=...&limit=...`) | ✅ YES | ❌ NO (404) | ✅ YES | | |
| | **JSON Body** | ✅ YES | ✅ YES | ✅ YES | | |
| --- | |
| ## 🚀 Recommended Next Steps | |
| 1. **Right Now**: Test locally using `http://127.0.0.1:7860/...` to verify it works | |
| 2. **Then**: Redeploy to Hugging Face (takes 2-3 minutes) | |
| 3. **Finally**: Test your HF deployment again | |
| Let me know if you need help with the redeployment process! | |