Skip to content

Commit 7170855

Browse files
authored
Update SDKdemo_scrape.py
1 parent 739673b commit 7170855

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

SDKdemo_scrape.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
from brightdata import bdclient
22

3-
bd = bdclient(api_token="your-api-token") #can also be taken from .env file
3+
client = bdclient(api_token="your-api-token") # The API can also be taken from .env file
44

5-
URL = (["https://www.amazon.com/dp/B079QHML21",
6-
"https://www.ebay.com/itm/365771796300",
7-
"https://www.walmart.com/ip/Apple-MacBook-Air-13-3-inch-Laptop-Space-Gray-M1-Chip-8GB-RAM-256GB-storage/609040889"])
5+
urls = ["https://example1.com", "https://example2.com", "https://example3.com"] # Replace with real URLs
6+
7+
results = client.scrape(url=urls) # Try to hover over the "scrape" function to see what available parameters you can add
88

9-
results = bd.scrape(url=URL, )
109
bd.download_content(results, filename="scrape_results.json")

0 commit comments

Comments
 (0)