Spaces:
Runtime error
Runtime error
File size: 1,189 Bytes
da9096d bf0ffcb da9096d 2858ef0 da9096d 2858ef0 da9096d c53181a da9096d a35ef78 da9096d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
from apify_client import ApifyClient
# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")
# Prepare the Actor input
run_input = { "inputURL": [
{ "url": "https://www.lidl.co.uk/c/food-drink/s10068374?offset=24" },
{ "url": "https://www.lidl.co.uk/p/ripen-at-home-loose-mango/p10030752#searchTrackingMasterId=Product.10030752&searchTrackingTitle=Ripen-at-Home+Loose+Mango&searchTrackingPageSize=12&searchTrackingPage=2&searchTrackingEvent=click&searchTrackingId=Product.10030752&searchTrackingOrigPos=1&searchTrackingPos=20&searchTrackingOrigPageSize=12&searchTrackingChannel=GB&list=search" },
] }
# Run the Actor and wait for it to finish
run = client.actor("thenetaji/lidl-scraper").call(run_input=run_input)
# Fetch and print Actor results from the run's dataset (if there are any)
print("πΎ Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item)
# π Want to learn more π? Go to β https://docs.apify.com/api/client/python/docs/quick-start |