Advertisement
whoisYeshua

Untitled

Sep 10th, 2021
5,536
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // snkrs de
  2. // Open devTools and paste into console
  3.  
  4. const resp = await fetch("https://api.nike.com/product_feed/threads/v2/?anchor=0&count=36&filter=marketplace%28DE%29&filter=language%28de%29&filter=upcoming%28true%29&filter=channelId%28010794e5-35fe-4e32-aaff-cd2c74f89d61%29&filter=exclusiveAccess%28true%2Cfalse%29", {
  5.   "headers": {
  6.     "accept": "*/*",
  7.     "accept-language": "en-US,en;q=0.9,ru;q=0.8",
  8.     "appid": "com.nike.commerce.snkrs.web",
  9.     "content-type": "application/json; charset=UTF-8",
  10.   },
  11.   "referrer": "https://www.nike.com/",
  12.   "referrerPolicy": "strict-origin-when-cross-origin",
  13.   "body": null,
  14.   "method": "GET",
  15.   "mode": "cors",
  16.   "credentials": "omit"
  17. });
  18. const json = await resp.json()
  19. const productsObject = json.objects
  20.  
  21. for (const product of productsObject) {
  22.     if (!product.productInfo) continue
  23.     const slug = product.publishedContent.properties.seo.slug
  24.     const title = product.publishedContent.properties.coverCard.properties.title
  25.     console.group(`${slug} - ${title}`)
  26.     for (const model of product.productInfo) {
  27.         console.group(model.merchProduct.labelName)
  28.         for (const size of model.skus) {
  29.             console.log('size:', size.nikeSize )
  30.         }
  31.         console.groupEnd()
  32.     }
  33.     console.groupEnd()
  34.    
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement