Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -27,8 +27,8 @@ def scrape_with_scraperapi(url, api_key, scenario=None):
|
|
| 27 |
# The correct endpoint for POST requests is the scenario endpoint
|
| 28 |
response = requests.post(
|
| 29 |
"http://api.scraperapi.com/scenario",
|
| 30 |
-
params={"api_key": api_key
|
| 31 |
-
json=scenario
|
| 32 |
)
|
| 33 |
else:
|
| 34 |
# The correct endpoint for simple GET requests is the root
|
|
|
|
| 27 |
# The correct endpoint for POST requests is the scenario endpoint
|
| 28 |
response = requests.post(
|
| 29 |
"http://api.scraperapi.com/scenario",
|
| 30 |
+
params={"api_key": api_key},
|
| 31 |
+
json={"url": url, "scenario": scenario}
|
| 32 |
)
|
| 33 |
else:
|
| 34 |
# The correct endpoint for simple GET requests is the root
|