2016-07-25 21 views
0

Webページデータ抽出のためのvbaにいくつかのコードがありますが、webpage.Webpage JavaスクリプトコードからWebページのJavaスクリプト値を抽出したいと考えています。 extactionすなわち「asinVariationValues」excel vbaを使用してWebページのJavaスクリプト値を抽出する方法

<script type="text/javascript"> 
P.register('twister-js-init-dpx-data', function() { 
var dataToReturn = { 
"dimensionsDisplayType" : [ 
"dropdown","swatch", 
], 
"isImmersiveExperience" : false, 
"isTabletWeb" : false, 
"immersiveBannersPresent" : true, 
"immersivePartialStateMessage" : "Select a dimName to see prices", 
"immersiveFullySelectedStateMessage" : "Prices shown are for dimName", 
"multiDimensionWeblabEnabled" : false, 
"dimensionSelectionData" : [{"isSelected":0,"isRequired":1},{"isSelected":1,"isRequired":0}], 
"updateDivLists" : { 
"full" : [{"updateOnHover":0,"divToUpdate":"companyCompliancePolicies_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"instantOrderUpdate_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"thumbs-image","customClientFunction":1,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":1,"divToUpdate":"twister-main-image","customClientFunction":1,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"averageCustomerReviews_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"ask_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"price_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"pmpux_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"primenote_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"shoefitr_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"dpFastTrack_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"addOnItem_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"availability_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"shipsFromSoldBy_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"smileEligibility_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"holidayAvailabilityMessage_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"originalPackagingMessage_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"andonCord_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"clickToContact_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"vendorPoweredCoupon_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"tellAFriendBox_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"buybox_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"redirection_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"moreBuyingChoices_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":1},{"updateOnHover":0,"divToUpdate":"product-ads-feedback_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"servicesInterstitial_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"miniATF_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"dp_browse_container_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"cpsiaProductSafetyWarning_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"aplus_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"importantInformation_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"averageCustomerReviews_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"giveaway_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0}], 
"partial" : [{"updateOnHover":0,"divToUpdate":"thumbs-image","customClientFunction":1,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":1,"divToUpdate":"twister-main-image","customClientFunction":1,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"shoefitr_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"tellAFriendBox_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"aplus_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0}], 
"parent" : [{"updateOnHover":0,"divToUpdate":"companyCompliancePolicies_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"instantOrderUpdate_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"averageCustomerReviews_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"ask_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"price_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"pmpux_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"primenote_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"dpFastTrack_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"addOnItem_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"availability_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"shipsFromSoldBy_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"smileEligibility_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"holidayAvailabilityMessage_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"originalPackagingMessage_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"andonCord_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"clickToContact_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"vendorPoweredCoupon_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"buybox_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"redirection_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"moreBuyingChoices_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":1},{"updateOnHover":0,"divToUpdate":"product-ads-feedback_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"servicesInterstitial_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"miniATF_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"dp_browse_container_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"cpsiaProductSafetyWarning_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"importantInformation_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"averageCustomerReviews_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0},{"updateOnHover":0,"divToUpdate":"giveaway_feature_div","customClientFunction":0,"isPrefetchable":1,"loadingBar":0}], 
"master" : [] 
}, 
"dpEnvironment" : "softlines", 
"ajaxUrlParams" : "&productTypeDefinition=SHOES&productGroupId=shoes_display_on_website&parentAsin=B00S8CF8JU&isPrime=0&isOneClickEnabled=0&fastRenderTreatment=C", 
"isImmersiveViewEnabled" : false, 
"isImmersiveViewEnabledOnDim" : [ 
      false,false, 
      ], 
"isSlotsEnabled" : [ 
        false,false, 
        ], 
"maxSwatchesForImmersiveView" : [0,0,], 
"dimensionsDisplaySubType" : ["TEXT","IMAGE",] 
,"twisterUpdateURLAppend": 
{ 
} 
,"displayTypeProperties" : [ 
{}, 
{} 
] 
,"shouldUseDPXTwisterData" : 1, 
"currentAsin" : "", 
"parentAsin" : "", 
"dimensionToAsinMap" : {"12_4":"B00RDN4EPY","12_3":"B00RDN51J2","10_3":"B00RDN50UM","11_2":"B00RDN5C7I","11_1":"B00RDN5Q0G","12_0":"B00RDN4Q48","10_1":"B00RDN5OB2","11_0":"B00RDN4R4M","0_1":"B00RDN5FWK","1_0":"B00RDN4HTW","0_2":"B00RDN53O0","2_0":"B00RDN4IPK","1_2":"B00RDN5494","2_1":"B00RDN5I36","2_2":"B00RDN54S0","3_1":"B00RDN5IP4","4_0":"B00RDN4KBW","2_3":"B00RDN4ULW","3_2":"B00RDN55C0","4_1":"B00RDN5JNA","5_0":"B00RDN4L1Q","3_3":"B00RDN4VFM","4_2":"B00RDN562Y","5_1":"B00RDN5KDY","6_0":"B00RDN4LNO","5_2":"B00RDN56N8","6_1":"B00RDN5LJW","7_0":"B00RDN4MGU","5_3":"B00RDN4XDC","6_2":"B00RDN57T6","7_1":"B00RDN5M6E","6_3":"B00RDN4Y18","7_2":"B00RDN58G8","8_1":"B00RDN5MSC","7_3":"B00RDN4YRM","8_2":"B00RDN591W","7_4":"B00RDN4BPM","8_3":"B00RDN4ZFS","9_2":"B00RDN5A6Q","8_4":"B00RDN4CEM","9_4":"B00RDN4DAA"}, 
"variationValues" : {"size_name":["5 B(M) US","5.5 B(M) US","6 B(M) US","6.5 B(M) US","7 B(M) US","7.5 B(M) US","8 B(M) US","8.5 B(M) US","9 B(M) US","9.5 B(M) US","10 B(M) US","10.5 B(M) US","11 B(M) US"],"color_name":["Teal/Lilac","Black","Logan Berry","Monument/Red","Cayenne/Grey"]}, 
"asinVariationValues" : {"B00RDN4IPK":{"size_name":"2","ASIN":"B00RDN4IPK","color_name":"0"},"B00RDN5Q0G":{"size_name":"11","ASIN":"B00RDN5Q0G","color_name":"1"},"B00RDN5M6E":{"size_name":"7","ASIN":"B00RDN5M6E","color_name":"1"},"B00RDN5A6Q":{"size_name":"9","ASIN":"B00RDN5A6Q","color_name":"2"},"B00RDN4MGU":{"size_name":"7","ASIN":"B00RDN4MGU","color_name":"0"},"B00RDN562Y":{"size_name":"4","ASIN":"B00RDN562Y","color_name":"2"},"B00RDN5MSC":{"size_name":"8","ASIN":"B00RDN5MSC","color_name":"1"},"B00RDN5KDY":{"size_name":"5","ASIN":"B00RDN5KDY","color_name":"1"},"B00RDN56N8":{"size_name":"5","ASIN":"B00RDN56N8","color_name":"2"},"B00RDN4BPM":{"size_name":"7","ASIN":"B00RDN4BPM","color_name":"4"},"B00RDN4Y18":{"size_name":"6","ASIN":"B00RDN4Y18","color_name":"3"},"B00RDN53O0":{"size_name":"0","ASIN":"B00RDN53O0","color_name":"2"},"B00RDN4YRM":{"size_name":"7","ASIN":"B00RDN4YRM","color_name":"3"},"B00RDN5C7I":{"size_name":"11","ASIN":"B00RDN5C7I","color_name":"2"},"B00RDN4Q48":{"size_name":"12","ASIN":"B00RDN4Q48","color_name":"0"},"B00RDN4XDC":{"size_name":"5","ASIN":"B00RDN4XDC","color_name":"3"},"B00RDN5I36":{"size_name":"2","ASIN":"B00RDN5I36","color_name":"1"},"B00RDN4HTW":{"size_name":"1","ASIN":"B00RDN4HTW","color_name":"0"},"B00RDN4L1Q":{"size_name":"5","ASIN":"B00RDN4L1Q","color_name":"0"},"B00RDN5IP4":{"size_name":"3","ASIN":"B00RDN5IP4","color_name":"1"},"B00RDN4LNO":{"size_name":"6","ASIN":"B00RDN4LNO","color_name":"0"},"B00RDN4EPY":{"size_name":"12","ASIN":"B00RDN4EPY","color_name":"4"},"B00RDN54S0":{"size_name":"2","ASIN":"B00RDN54S0","color_name":"2"},"B00RDN4DAA":{"size_name":"9","ASIN":"B00RDN4DAA","color_name":"4"},"B00RDN4ZFS":{"size_name":"8","ASIN":"B00RDN4ZFS","color_name":"3"},"B00RDN50UM":{"size_name":"10","ASIN":"B00RDN50UM","color_name":"3"},"B00RDN58G8":{"size_name":"7","ASIN":"B00RDN58G8","color_name":"2"},"B00RDN4VFM":{"size_name":"3","ASIN":"B00RDN4VFM","color_name":"3"},"B00RDN5JNA":{"size_name":"4","ASIN":"B00RDN5JNA","color_name":"1"},"B00RDN591W":{"size_name":"8","ASIN":"B00RDN591W","color_name":"2"},"B00RDN5OB2":{"size_name":"10","ASIN":"B00RDN5OB2","color_name":"1"},"B00RDN4ULW":{"size_name":"2","ASIN":"B00RDN4ULW","color_name":"3"},"B00RDN4KBW":{"size_name":"4","ASIN":"B00RDN4KBW","color_name":"0"},"B00RDN55C0":{"size_name":"3","ASIN":"B00RDN55C0","color_name":"2"},"B00RDN5FWK":{"size_name":"0","ASIN":"B00RDN5FWK","color_name":"1"},"B00RDN51J2":{"size_name":"12","ASIN":"B00RDN51J2","color_name":"3"},"B00RDN57T6":{"size_name":"6","ASIN":"B00RDN57T6","color_name":"2"},"B00RDN5LJW":{"size_name":"6","ASIN":"B00RDN5LJW","color_name":"1"},"B00RDN4CEM":{"size_name":"8","ASIN":"B00RDN4CEM","color_name":"4"},"B00RDN4R4M":{"size_name":"11","ASIN":"B00RDN4R4M","color_name":"0"},"B00RDN5494":{"size_name":"1","ASIN":"B00RDN5494","color_name":"2"}}, 
"dimensionValuesData" : [["5 B(M) US","5.5 B(M) US","6 B(M) US","6.5 B(M) US","7 B(M) US","7.5 B(M) US","8 B(M) US","8.5 B(M) US","9 B(M) US","9.5 B(M) US","10 B(M) US","10.5 B(M) US","11 B(M) US"],["Teal/Lilac","Black","Logan Berry","Monument/Red","Cayenne/Grey"]], 
"asinToDimensionIndexMap" : {"B00RDN4IPK":[2,0],"B00RDN5Q0G":[11,1],"B00RDN5M6E":[7,1],"B00RDN5A6Q":[9,2],"B00RDN4MGU":[7,0],"B00RDN562Y":[4,2],"B00RDN5MSC":[8,1],"B00RDN5KDY":[5,1],"B00RDN56N8":[5,2],"B00RDN4BPM":[7,4],"B00RDN4Y18":[6,3],"B00RDN53O0":[0,2],"B00RDN4YRM":[7,3],"B00RDN5C7I":[11,2],"B00RDN4Q48":[12,0],"B00RDN4XDC":[5,3],"B00RDN5I36":[2,1],"B00RDN4HTW":[1,0],"B00RDN4L1Q":[5,0],"B00RDN5IP4":[3,1],"B00RDN4LNO":[6,0],"B00RDN4EPY":[12,4],"B00RDN54S0":[2,2],"B00RDN4DAA":[9,4],"B00RDN4ZFS":[8,3],"B00RDN50UM":[10,3],"B00RDN58G8":[7,2],"B00RDN4VFM":[3,3],"B00RDN5JNA":[4,1],"B00RDN591W":[8,2],"B00RDN5OB2":[10,1],"B00RDN4ULW":[2,3],"B00RDN4KBW":[4,0],"B00RDN55C0":[3,2],"B00RDN5FWK":[0,1],"B00RDN51J2":[12,3],"B00RDN57T6":[6,2],"B00RDN5LJW":[6,1],"B00RDN4CEM":[8,4],"B00RDN4R4M":[11,0],"B00RDN5494":[1,2]}, 
"selectedVariationValues" : {"size_name":-1,"color_name":0}, 
"reactId" : "X_0", 
"currentDimensionCombinationId" : "X_0",     
"deletedLandingAsinInfo" : {},    
"num_total_variations" : '', 
"dimensions" : [], 
"unselectedDimCount" : '', 
"selected_variations" : {}, 
"dimensionValuesDisplayData" : {}, 
"prioritizeReqPrefetch" : '', 
"num_variation_dimensions" : '', 
"num_total_variations" : '', 
"dimensionsDisplay" : [], 
"variationDisplayLabels" : {}, 
"dimensionHierarchyData" : [0,0], 
"topHierarchicalDimensionIndex" : {}, 
"hierarchicalPivoting" : false, 
"isIconPresentForDimensionValue" : [[0,0,0,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0]], 
}; 
return dataToReturn; 
}); 
</script> 
+0

あなたのJavaScriptは不完全そうです... –

+0

まだ有効ではありませんスクリプト - あなたはそれを試しましたか? –

+0

Sir..codeは次のページにあります。「view-source:https://www.amazon.com/gp/offer-listing/B00RDN4HTW/ref=olp_twister_child?ie = UTF8&mv_color_name = 3&mv_size_name = 1」を確認してください。 – Tahirsatti123

答えて

関連する問題