Skip to content

Commit d75331a

Browse files
עידן וילנסקיעידן וילנסקי
authored andcommitted
2 parents 1b4a419 + 1a83d13 commit d75331a

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

SDKdemo_scrape.py

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

3-
bd = bdclient(api_token="73fa4ac2-4487-4509-9250-d902e58985fd")
3+
bd = bdclient(api_token="your-api-token") #can also be taken from .env file
44

5-
query = ["iphone 16", "coffee maker", "portable projector", "sony headphones",
6-
"laptop stand", "power bank", "running shoes", "android tablet",
7-
"hiking backpack", "dash cam"]
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"])
88

9-
results = bd.search(query=query, search_engine="google", format="json")
10-
11-
bd.download_content(results, filename="search_results.json", format="json")
9+
results = bd.scrape(url=URL, )
10+
bd.download_content(results, filename="scrape_results.json")

SDKdemo_search.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
from brightdata import bdclient
2+
3+
bd = bdclient(api_token="your-api-token") #can also be taken from .env file
4+
5+
query = ["iphone 16", "coffee maker", "portable projector", "sony headphones",
6+
"laptop stand", "power bank", "running shoes", "android tablet",
7+
"hiking backpack", "dash cam"]
8+
9+
results = bd.search(query=query, search_engine="google", format="json")
10+
11+
bd.download_content(results, filename="search_results.json", format="json")

SDKdemo_unlock.py

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)