http://www.sufeinet.com/plugin.php?id=keke_group

苏飞论坛

 找回密码
 马上注册

QQ登录

只需一步,快速开始

分布式系统框架(V2.0) 轻松承载百亿数据,千万流量!讨论专区 - 源码下载 - 官方教程

HttpHelper爬虫框架(V2.7-含.netcore) HttpHelper官方出品,爬虫框架讨论区 - 源码下载 - 在线测试和代码生成

HttpHelper爬虫类(V2.0) 开源的爬虫类,支持多种模式和属性 源码 - 代码生成器 - 讨论区 - 教程- 例子

查看: 6555|回复: 5

[HttpHelper] POST 的数据为JSON对象,如何使用?

[复制链接]
发表于 2019-9-15 11:29:12 | 显示全部楼层 |阅读模式
  • Request Headers:
  • :authority:
    www.esteelauder.com
  • :method:
    POST
  • :path:
    /rpc/jsonrpc.tmpl
  • :scheme:
    https
  • accept:
    */*
  • accept-encoding:
    gzip, deflate, br
  • accept-language:
    zh-CN,zh;q=0.9
  • cache-control:
    no-cache
  • content-length:
    241
  • content-type:
    application/x-www-form-urlencoded; charset=UTF-8
  • cookie:
    SESSION=787993087-5213e85effe0befe0843c06d757243b84d4526d95a5fc5dc518f1eb78320dbb9; ngsession=701ae1a209436587; LOCALE=en_US; ngglobal=701ae1a281614001; AKA_A2=A; ak_bmsc=FEF37BFE65097F90B3121FA09D4D6B1F68732647FD04000004A17D5D70B31F79~plRoht+cESYejfLofiJyjSjwtcPXZNvBBKl+KHFshUelPGrRCTW05ZsNl3kRMhLflES8LUGMSBDM3KsuOSTHnbhVOkgTGqsDvntU20wvujBqveCIruk30osPJzUSk7LoDDKCas+TvJkP/srDUrGbGm3g8tefa3dcQGF9d6Oqi5YyS72Y//8kY1iWUJYTP9/iMW0bBSaimMaEfhygGkKlAXOFsTQvUz0NYG1rjcg1qzeeQ=; has_js=1; client.isMobile=0; elist15=1; PSN=%7B%7D; __ssid=aa6912ebc9f92ef1730f30fa870264d; Auser=0%7C0%7C0%7C0%7C0%7C0%7C0%7C0%7C0-null; FeedTrayCookie=1; AMCVS_3C155B5B54E781000A4C98A2%40AdobeOrg=1; AMCV_3C155B5B54E781000A4C98A2%40AdobeOrg=1406116232%7CMCIDTS%7C18155%7CMCMID%7C50389172815751810150473625481212611763%7CMCAAMLH-1569121296%7C11%7CMCAAMB-1569121296%7CRKhpRz8krg2tLO6pguXWp5olkAcUniQYPHaMWWgdJ3xzPWQmdj0y%7CMCOPTOUT-1568523696s%7CNONE%7CvVersion%7C2.5.0; _ga=GA1.3.1031175584.1568516501; _gid=GA1.3.684050234.1568516501; s_cc=true; cto_lwid=bd0fff63-4d59-404a-b8ae-c86b3305d4d0; __bron_bav=2019/9/15 上午11:01:42; __bron_bas=4028b06c-8c93-4d6e-a763-7fe6f82a3665; _gcl_au=1.1.1092850497.1568516503; _scid=308a715b-cc3e-40bb-9829-489d7eb79f4c; __qca=P0-76316187-1568516502708; yieldify_stc=1; yieldify_st=1; _y1sp_ses.ab92=*; yieldify_sale_ts=1568516504596; yieldify_visit=1; yieldify_iv=1; __pr.NaN=rsrclgc4z6; __pr.1of7=skwgydlsog; yieldify_location=%257B%2522country%2522%253A%2522China%2522%252C%2522region%2522%253A%2522Anhui%2522%252C%2522city%2522%253A%2522Lu%27an%2522%257D; _y2=1%3AeyJjIjp7Im8iOjk0NTMyNTI3fX0%3D%3ANTQxOTAyNzUy%3A2; LPVID=E4OGM2MmFkMTQwYjA5N2E5; LPSID-48719195=Qvw65FT_TxqPSEumftD64A; FE_USER_CART=available%3A%26csr_logged_in%3A0%26current_available%3A%26email%3A%26first_name%3A%26full_name%3A%26is_loyalty_member%3A0%26is_rewards_eligible%3A0%26item_count%3A%26loyalty_level%3A0%26loyalty_level_name%3A%26next_level%3A1%26next_level_name%3ABe+Excited%26pc_email_optin%3A0%26points%3A%26points_to_next_level%3A0%26region_id%3A%26signed_in%3A0; __bron_bae=6b13ff40be738e914c0c8d3dc0f3ee8a31afdc67b0fa5a621445e4664038398f9e55f8925dadaca2069a95de71d262ab08cbe5a7d3d5afcdc3155f5f39b11a77; persistent_user_cookie=%7B%22first_time%22%3A0%2C%22first_name%22%3Anull%2C%22pc_email_optin%22%3A%220%22%2C%22email%22%3Anull%2C%22is_loyalty_member%22%3A%220%22%2C%22points%22%3Anull%2C%22loyalty_level%22%3A%220%22%2C%22loyalty_level_name%22%3Anull%2C%22points_to_next_level%22%3A%220%22%2C%22next_level%22%3A%221%22%2C%22next_level_name%22%3A%22Be%2BExcited%22%7D; s_sess=%20p17%3Dnohome%3B%20advancednightrepair%3Dnoadvancednightrepair%3B%20bronzegoddess%3Dnobronzegoddess%3B%20cleardifference%3Dnocleardifference%3B%20purecolorenvy%3Dnopurecolorenvy%3B%20v24%3Dnoclick%3B; utag_main=v_id:016d32de5280001ad3493d4d518303072002e06a0086e$_sn:1$_ss:0$_st:1568519593295$ses_id:1568516493954%3Bexp-session$_pn:10%3Bexp-session$vapi_domain:esteelauder.com; __bron_bar=[{"productId":"SKU106967","timeStamp":1568516585218},{"productId":null,"timeStamp":1568517778577},{"productId":"SKU50767","timeStamp":1568517793556}]; __olapicU=1568517794505; _y1sp_id.ab92=ec7a4c93-f10b-4e01-ad26-2c65700cb583.1568516505.1.1568517794.1568516505.c4878438-53e9-4f37-bcaf-cdea7418f6c6; csrftoken=4c5e8d6e325059a969667a45ddb4715781cd23e6%2C6634aeb5fb3a2c05ab0a62bb22ff4a3065245ba2%2C1568517792; yieldify_ujt=788; _yi=1%3AeyJsaSI6eyJjIjoxLCJjb2wiOjAsImNwZyI6MTM3MDEsImNwaSI6OTQ2MTY3MjUzMDAsInNjIjoxLCJ0cyI6MTU2ODUxNjUyNzYxNH0sInNlIjp7ImMiOjEsImxhIjoxNTY4NTE3ODE5MzYwLCJwIjo4LCJzYyI6MTAwMX0sInUiOnsiaWQiOiI0YmYyZDVlNS1jNDIyLTRlOGYtODE2Yi0wZTRmMjNiYjY0MzUiLCJmbCI6IjAifX0%3D%3ALTE4MDY5MDc0ODg%3D%3A2; RT="sl=10&ss=1568516487200&tt=290025&obo=3&sh=1568517819225%3D10%3A3%3A290025%2C1568517787046%3D9%3A2%3A290025%2C1568517772863%3D8%3A2%3A278068%2C1568517770257%3D7%3A2%3A275544%2C1568517099683%3D6%3A1%3A275544&dm=esteelauder.com&si=26dcc9cb-10c0-45f1-94b0-10f0d23541d0&bcn=%2F%2F60062f0f.akstat.io%2F"; elist15_expire=1568517831159; bm_sv=F396FCBADAD743F09E931461BD14B553~g/d5eoMA30LsMoaENnLirehN+YaaaEozzvP0gOBIcwjUgLt6aKKNKIbrY12AQya4PGGLLWQDj7ufhqlvHDmGD6mZnqb0Aa0m32taOb9WiyjYdOwlUuTZx4q47OFnAZWNhmv/jcdCdnDF2OPdX2J6PGP3QsJx0Ea1Ts48OOlLZpc=
  • origin:
    https://www.esteelauder.com
  • pragma:
    no-cache
  • referer:
    https://www.esteelauder.com/product/11564/27307/product-catalog/fragrance/collections/modern-muse/modern-muse/eau-de-parfum-spray
  • sec-fetch-mode:
    cors
  • sec-fetch-site:
    same-origin
  • user-agent:
    Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36
  • x-requested-with:
    XMLHttpRequest




1. 开通SVIP会员,免费下载本站所有源码,不限次数据,不限时间
2. 加官方QQ群,加官方微信群获取更多资源和帮助
3. 找站长苏飞做网站、商城、CRM、小程序、App、爬虫相关、项目外包等点这里
 楼主| 发表于 2019-9-15 11:29:40 | 显示全部楼层
From Data
JSONRPC: [{"method":"prodcat.querykey","params":[{"products":["PROD27307","PROD36701","PROD61410","PROD29363"],"query_key":"catalog-mpp-volatile"}],"id":1}]
 楼主| 发表于 2019-9-15 11:30:20 | 显示全部楼层
如果成功的话,返回的Json数据,如下:
[{"jsonrpc":"2.0","result":{"data":{"Analytics":null,"dataLayer":{"product_impression_url":["/product/11564/27307/product-catalog/fragrance/collections/modern-muse/modern-muse/eau-de-parfum-spray","/product/571/36701/product-catalog/fragrance/modern-muse-le-rouge/eau-de-parfum-spray","/product/14324/61410/product-catalog/whats-new/gifts/modern-muse/travel-collection","/product/681/29363/product-catalog/skincare/micro-essence/skin-activating-treatment-lotion"],"product_impression_id":["PROD27307","PROD36701","PROD61410","PROD29363"],"product_impression_price":["75","75","90","62"],"product_impression_name":["Modern Muse","Modern Muse Le Rouge","Modern Muse","Micro Essence"],"product_impression_sku_large_image_url":["/media/export/cms/products/420x578/el_sku_YF3101_420x578_0.jpg","/media/export/cms/products/420x578/el_sku_R56X01_420x578_0.jpg","/media/export/cms/products/420x578/el_sku_P6K6Y8_420x578_0.jpg","/media/export/cms/products/420x578/el_sku_R69H01_420x578_0.jpg"],"datalayer_events":{},"product_impression_small_image_url":[null,null,null,null],"product_impression_size":["1.0 oz.","1.0 oz.",null,"2.5 oz."],"product_impression_shade":[null,null,null,null],"product_impression_base_id":[27307,36701,61410,29363],"product_impression_sku":["SKU50767","SKU64566","SKU97616","SKU68554"],"product_impression_category_name":["Modern Muse","Fragrance","Gifts","Skincare"],"product_impression_category_id":["CAT11564","CAT571","CAT14324","CAT681"],"product_impression_short_desc":["Be an inspiration. An alluring contrast of sparkling florals and sleek, sensual woods.",null,null,null],"product_impression_category":["CAT11564","CAT571","CAT14324","CAT681"],"product_impression_sku_small_image_url":["/media/export/cms/products/226x311/el_sku_YF3101_226x311_0.jpg","/media/export/cms/products/226x311/el_sku_R56X01_226x311_0.jpg","/media/export/cms/products/226x311/el_sku_P6K6Y8_226x311_0.jpg","/media/export/cms/products/226x311/el_sku_R69H01_226x311_0.jpg"]}},"value":{"products":[{"isShoppable":1,"path":"CAT11564PROD27307","PROD_CAT_DISPLAY_ORDER":3,"skus":[{"MISC_FLAG":0,"path":"CAT11564PROD27307SKU50767","DISPLAY_ORDER":1,"VTO_FLAG":null,"displayStatus":7,"isOrderable":1,"isShoppable":1,"formattedPrice":"$75.00","formattedUnitPrice":"","PRODUCT_ID":"PROD27307","PRICE":75,"LIFE_OF_PRODUCT":2,"FUTURE_PRICE":null,"PRICE2":null,"RELEASE_DATE":null,"SKU_ID":"SKU50767","formattedPrice2":"$75.00","displayOrder":1,"formattedFuturePrice":"$75.00","formattedInstallmentPrice":null,"isPreOrder":0,"INVENTORY_STATUS":1,"formattedTaxedPrice":"$0.00"},{"MISC_FLAG":0,"path":"CAT11564PROD27307SKU51083","DISPLAY_ORDER":2,"VTO_FLAG":null,"displayStatus":7,"isOrderable":1,"isShoppable":1,"formattedPrice":"$95.00","formattedUnitPrice":"","PRODUCT_ID":"PROD27307","PRICE":95,"LIFE_OF_PRODUCT":2,"FUTURE_PRICE":null,"PRICE2":null,"RELEASE_DATE":null,"SKU_ID":"SKU51083","formattedPrice2":"$95.00","displayOrder":2,"formattedFuturePrice":"$95.00","formattedInstallmentPrice":null,"isPreOrder":0,"INVENTORY_STATUS":1,"formattedTaxedPrice":"$0.00"},{"MISC_FLAG":0,"path":"CAT11564PROD27307SKU51084","DISPLAY_ORDER":3,"VTO_FLAG":null,"displayStatus":7,"isOrderable":1,"isShoppable":1,"formattedPrice":"$125.00","formattedUnitPrice":"","PRODUCT_ID":"PROD27307","PRICE":125,"LIFE_OF_PRODUCT":2,"FUTURE_PRICE":null,"PRICE2":null,"RELEASE_DATE":null,"SKU_ID":"SKU51084","formattedPrice2":"$125.00","displayOrder":3,"formattedFuturePrice":"$125.00","formattedInstallmentPrice":null,"isPreOrder":0,"INVENTORY_STATUS":1,"formattedTaxedPrice":"$0.00"}],"displayOrder":3,"displayStatus":7,"PRODUCT_ID":"PROD27307"},{"isShoppable":1,"path":"CAT571PROD36701","PROD_CAT_DISPLAY_ORDER":86,"skus":[{"MISC_FLAG":0,"path":"CAT571PROD36701SKU64566","DISPLAY_ORDER":0,"VTO_FLAG":null,"displayStatus":7,"isOrderable":1,"isShoppable":1,"formattedPrice":"$75.00","formattedUnitPrice":"","PRODUCT_ID":"PROD36701","PRICE":75,"LIFE_OF_PRODUCT":2,"FUTURE_PRICE":null,"PRICE2":null,"RELEASE_DATE":null,"SKU_ID":"SKU64566","formattedPrice2":"$75.00","displayOrder":0,"formattedFuturePrice":"$75.00","formattedInstallmentPrice":null,"isPreOrder":0,"INVENTORY_STATUS":1,"formattedTaxedPrice":"$0.00"},{"MISC_FLAG":0,"path":"CAT571PROD36701SKU64567","DISPLAY_ORDER":1,"VTO_FLAG":null,"displayStatus":7,"isOrderable":1,"isShoppable":1,"formattedPrice":"$95.00","formattedUnitPrice":"","PRODUCT_ID":"PROD36701","PRICE":95,"LIFE_OF_PRODUCT":2,"FUTURE_PRICE":null,"PRICE2":null,"RELEASE_DATE":null,"SKU_ID":"SKU64567","formattedPrice2":"$95.00","displayOrder":1,"formattedFuturePrice":"$95.00","formattedInstallmentPrice":null,"isPreOrder":0,"INVENTORY_STATUS":1,"formattedTaxedPrice":"$0.00"},{"MISC_FLAG":0,"path":"CAT571PROD36701SKU64568","DISPLAY_ORDER":2,"VTO_FLAG":null,"displayStatus":7,"isOrderable":1,"isShoppable":1,"formattedPrice":"$125.00","formattedUnitPrice":"","PRODUCT_ID":"PROD36701","PRICE":125,"LIFE_OF_PRODUCT":2,"FUTURE_PRICE":null,"PRICE2":null,"RELEASE_DATE":null,"SKU_ID":"SKU64568","formattedPrice2":"$125.00","displayOrder":2,"formattedFuturePrice":"$125.00","formattedInstallmentPrice":null,"isPreOrder":0,"INVENTORY_STATUS":1,"formattedTaxedPrice":"$0.00"}],"displayOrder":86,"displayStatus":7,"PRODUCT_ID":"PROD36701"},{"isShoppable":1,"path":"CAT14324PROD61410","PROD_CAT_DISPLAY_ORDER":0,"skus":[{"MISC_FLAG":28,"path":"CAT14324PROD61410SKU97616","DISPLAY_ORDER":0,"VTO_FLAG":null,"displayStatus":7,"isOrderable":1,"isShoppable":1,"formattedPrice":"$90.00","formattedUnitPrice":"","PRODUCT_ID":"PROD61410","PRICE":90,"LIFE_OF_PRODUCT":1,"FUTURE_PRICE":null,"PRICE2":null,"RELEASE_DATE":null,"SKU_ID":"SKU97616","formattedPrice2":"$90.00","displayOrder":0,"formattedFuturePrice":"$90.00","formattedInstallmentPrice":null,"isPreOrder":0,"INVENTORY_STATUS":1,"formattedTaxedPrice":"$0.00"}],"displayOrder":0,"displayStatus":7,"PRODUCT_ID":"PROD61410"},{"isShoppable":1,"path":"CAT681PROD29363","PROD_CAT_DISPLAY_ORDER":134,"skus":[{"MISC_FLAG":0,"path":"CAT681PROD29363SKU68554","DISPLAY_ORDER":0,"VTO_FLAG":null,"displayStatus":7,"isOrderable":1,"isShoppable":1,"formattedPrice":"$62.00","formattedUnitPrice":"","PRODUCT_ID":"PROD29363","PRICE":62,"LIFE_OF_PRODUCT":2,"FUTURE_PRICE":null,"PRICE2":null,"RELEASE_DATE":null,"SKU_ID":"SKU68554","formattedPrice2":"$62.00","displayOrder":0,"formattedFuturePrice":"$62.00","formattedInstallmentPrice":null,"isPreOrder":0,"INVENTORY_STATUS":1,"formattedTaxedPrice":"$0.00"},{"MISC_FLAG":0,"path":"CAT681PROD29363SKU72848","DISPLAY_ORDER":1,"VTO_FLAG":null,"displayStatus":7,"isOrderable":1,"isShoppable":1,"formattedPrice":"$105.00","formattedUnitPrice":"","PRODUCT_ID":"PROD29363","PRICE":105,"LIFE_OF_PRODUCT":2,"FUTURE_PRICE":null,"PRICE2":null,"RELEASE_DATE":null,"SKU_ID":"SKU72848","formattedPrice2":"$105.00","displayOrder":1,"formattedFuturePrice":"$105.00","formattedInstallmentPrice":null,"isPreOrder":0,"INVENTORY_STATUS":1,"formattedTaxedPrice":"$0.00"},{"MISC_FLAG":0,"path":"CAT681PROD29363SKU90122","DISPLAY_ORDER":2,"VTO_FLAG":null,"displayStatus":7,"isOrderable":0,"isShoppable":0,"formattedPrice":"$190.00","formattedUnitPrice":"","PRODUCT_ID":"PROD29363","PRICE":190,"LIFE_OF_PRODUCT":2,"FUTURE_PRICE":null,"PRICE2":null,"RELEASE_DATE":null,"SKU_ID":"SKU90122","formattedPrice2":"$190.00","displayOrder":2,"formattedFuturePrice":"$190.00","formattedInstallmentPrice":null,"isPreOrder":0,"INVENTORY_STATUS":7,"formattedTaxedPrice":"$0.00"}],"displayOrder":134,"displayStatus":7,"PRODUCT_ID":"PROD29363"}]}},"id":1}]

 楼主| 发表于 2019-9-15 11:30:59 | 显示全部楼层
请教高手,这种情况,怎么使用站长的这个类?
发表于 2019-9-16 09:28:45 | 显示全部楼层
JSON序列号为字符串,然后站长的Item里有个属性,赋值给PostData
发表于 2019-9-16 09:52:57 | 显示全部楼层
直接当成字符串传过来就行了
您需要登录后才可以回帖 登录 | 马上注册

本版积分规则

QQ|手机版|小黑屋|手机版|联系我们|关于我们|广告合作|苏飞论坛 ( 豫ICP备18043678号-2)

GMT+8, 2024-11-22 02:27

© 2014-2021

快速回复 返回顶部 返回列表