MCPcopy
hub / github.com/oxylabs/how-to-scrape-amazon-prices / get_deals_results

Function get_deals_results

code_examples/example.py:55–68  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

53
54
55def get_deals_results(url):
56 payload = {
57 "source": "amazon",
58 "url": url,
59 "parse": True,
60 }
61 response = requests.post(
62 "https://realtime.oxylabs.io/v1/queries",
63 auth=(USERNAME, PASSWORD),
64 json=payload,
65 )
66 response.raise_for_status()
67 results = response.json()["results"][0]["content"]["results"]["organic"]
68 return parse_price_results(results)
69
70
71dog_food_category_id = "2975359011"

Callers 1

example.pyFile · 0.85

Calls 1

parse_price_resultsFunction · 0.85

Tested by

no test coverage detected