• 京东详情图片css 获取图片


    文件

    .ssd-module-wrap{position:relative;margin:0 auto;750px;text-align:left;background-color:#fff}.ssd-module-wrap .ssd-module,.ssd-module-wrap .ssd-module-heading{750px;position:relative;overflow:hidden}.ssd-module-wrap .ssd-floor-activity{max-height:380px;overflow:hidden}.ssd-module-wrap .ssd-floor-shopPrior{max-height:900px;overflow:hidden}.ssd-module-wrap .ssd-floor-authorize{max-height:300px;overflow:hidden}.ssd-module-wrap .ssd-floor-reminder{max-height:4000px;overflow:hidden}.ssd-module-wrap .ssd-module{background-repeat:no-repeat;background-position:left top;background-size:100% 100%}.ssd-module-wrap .ssd-module-heading{background-repeat:no-repeat;background-position:left center;background-size:100% 100%}.ssd-module-wrap .ssd-module-heading .ssd-module-heading-layout{display:inline-block}.ssd-module-wrap .ssd-module-heading .ssd-widget-heading-ch{float:left;display:inline-block;margin:0 6px 0 15px;height:100%}.ssd-module-wrap .ssd-module-heading .ssd-widget-heading-en{float:left;display:inline-block;margin:0 15px 0 6px;height:100%}.ssd-module-wrap .ssd-widget-circle,.ssd-module-wrap .ssd-widget-line,.ssd-module-wrap .ssd-widget-pic,.ssd-module-wrap .ssd-widget-rectangle,.ssd-module-wrap .ssd-widget-table,.ssd-module-wrap .ssd-widget-text,.ssd-module-wrap .ssd-widget-triangle{position:absolute;overflow:hidden}.ssd-module-wrap .ssd-widget-rectangle{box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}.ssd-module-wrap .ssd-widget-triangle svg{100%;height:100%}.ssd-module-wrap .ssd-widget-table table{100%;height:100%}.ssd-module-wrap .ssd-widget-table td{position:relative;white-space:pre-line;word-break:break-all}.ssd-module-wrap .ssd-widget-pic img{display:block;100%;height:100%}.ssd-module-wrap .ssd-widget-text{line-height:1.5;word-break:break-all}.ssd-module-wrap .ssd-widget-text span{display:block;overflow:hidden;100%;height:100%;padding:0;margin:0;word-break:break-all;word-wrap:break-word;white-space:normal}.ssd-module-wrap .ssd-widget-link{position:absolute;left:0;top:0;100%;height:100%;background:0 0;z-index:100}.ssd-module-wrap .ssd-cell-text{position:absolute;top:0;left:0;right:0;100%;height:100%;overflow:auto}.ssd-module-wrap .ssd-show{display:block}.ssd-module-wrap .ssd-hide{display:none}.ssd-module-wrap .M16379917349831{750px; background-color:#cbcbcb; background-size:100% 100%; background-image:url(//img30.360buyimg.com/sku/jfs/t1/203541/29/16450/112641/61a1c535Ec1c93540/957aa8ea203bd8fd.jpg); height:554px}
    .ssd-module-wrap .M16379917354642{750px; background-color:#b3b3b3; background-size:100% 100%; background-image:url(//img30.360buyimg.com/sku/jfs/t1/205390/32/17998/106515/61b1771aEb0e84b11/4a0652c9ffdd37de.jpg); height:368px}
    .ssd-module-wrap .M16379917358403{750px; background-color:#d7d7d7; background-size:100% 100%; background-image:url(//img30.360buyimg.com/sku/jfs/t1/197854/19/18617/120325/61a1c535E7aef55a0/a161c275e38cab3d.jpg); height:378px}
    .ssd-module-wrap .M16379917368214{750px; background-color:#e9e9e9; background-size:100% 100%; background-image:url(//img30.360buyimg.com/sku/jfs/t1/203139/14/16898/78820/61a1c535E2cb01275/713103e4266ff6a6.jpg); height:408px}
    .ssd-module-wrap .M16379917372995{750px; background-color:#b3b3b3; background-size:100% 100%; background-image:url(//img30.360buyimg.com/sku/jfs/t1/140230/2/24290/90564/61a1c535Ee4f0b377/c66dd45794e2ad43.jpg); height:716px}
    .ssd-module-wrap .M16379917376836{750px; background-color:#b3b3b3; background-size:100% 100%; background-image:url(//img30.360buyimg.com/sku/jfs/t1/204147/30/16882/51599/61a1c535E67699e54/975e84adb5c4d0b1.jpg); height:461px}
    .ssd-module-wrap .M16379917380798{750px; background-color:#f2f2f2; background-size:100% 100%; background-image:url(//img30.360buyimg.com/sku/jfs/t1/222747/28/4102/61590/61a1c535E7178eb29/aa4f55b33368365d.jpg); height:457px}
    .ssd-module-wrap .M16379917385219{750px; background-color:#cbcbcb; background-size:100% 100%; background-image:url(//img30.360buyimg.com/sku/jfs/t1/172294/23/21365/110449/61a1c535E6f9eb703/cc59aa7200bf1257.jpg); height:613px}
    .ssd-module-wrap .M163799173903110{750px; background-color:#d7d7d7; background-size:100% 100%; background-image:url(//img30.360buyimg.com/sku/jfs/t1/138244/32/24840/225744/61a1c535Ee3d1359e/9a5460ede6f6d26d.jpg); height:1065px}
    .ssd-module-wrap .M163799174003111{750px; background-color:#b3b3b3; background-size:100% 100%; background-image:url(//img30.360buyimg.com/sku/jfs/t1/156616/6/24351/98934/61a1c535E83b7406b/8e010be4733ea283.jpg); height:810px}
    .ssd-module-wrap .M163799174046312{750px; background-color:#cbcbcb; background-size:100% 100%; background-image:url(//img30.360buyimg.com/sku/jfs/t1/221347/33/3957/119995/61a1c535E662bff40/1059e292ea36c676.jpg); height:811px}
    .ssd-module-wrap .M163799174088113{750px; background-color:#cbcbcb; background-size:100% 100%; background-image:url(//img30.360buyimg.com/sku/jfs/t1/199253/10/18287/132540/61a1c535Ec870f372/f7af3ed8e183c307.jpg); height:1083px}
    .ssd-module-wrap .M163799174122615{750px; background-color:#d7d7d7; background-size:100% 100%; background-image:url(//img30.360buyimg.com/sku/jfs/t1/213679/1/5701/183830/61a1c535E96285260/8ebce1c3d5f64098.jpg); height:1558px}
    .ssd-module-wrap .M163799174166416{750px; background-color:#e9e9e9; background-size:100% 100%; background-image:url(//img30.360buyimg.com/sku/jfs/t1/161934/4/26930/336299/61a1c536E8cea831d/27f4f1b2a7412f59.jpg); height:1355px}
    .ssd-module-wrap .M163799174215317{750px; background-color:#e9e9e9; background-size:100% 100%; background-image:url(//img30.360buyimg.com/sku/jfs/t1/206016/10/16698/99218/61a1c535Ec73c537b/df80b86fec328882.jpg); height:779px}
    .ssd-module-wrap .M163799174249019{750px; background-color:#d7d7d7; background-size:100% 100%; background-image:url(//img30.360buyimg.com/sku/jfs/t1/144766/35/24868/202470/61a1c535Eb603259e/799540855bae8b63.jpg); height:1102px}
    .ssd-module-wrap .M163799174303020{750px; background-color:#e9e9e9; background-size:100% 100%; background-image:url(//img30.360buyimg.com/sku/jfs/t1/141833/28/21290/242409/61a1c535E612783a0/0a8018a6030c0d93.jpg); height:1181px}
    .ssd-module-wrap .M163799174347121{750px; background-color:#b3b3b3; background-size:100% 100%; background-image:url(//img30.360buyimg.com/sku/jfs/t1/207009/26/10847/180179/61a1c535Eba15cb24/6befb6faa243f305.jpg); height:1021px}
    .ssd-module-wrap .M163799174380322{750px; background-color:#f2f2f2; background-size:100% 100%; background-image:url(//img30.360buyimg.com/sku/jfs/t1/210693/9/10714/241060/61a1c536E0b36654f/0188e4610ce214e3.jpg); height:1065px}
    .ssd-module-wrap .M163799174454123{750px; background-color:#e9e9e9; background-size:100% 100%; background-image:url(//img30.360buyimg.com/sku/jfs/t1/217298/4/5850/59822/61a1c535E3022bda3/d71bbaec7a3218fa.jpg); height:479px}
    .ssd-module-wrap .M163799174475824{750px; background-color:#cbcbcb; background-size:100% 100%; background-image:url(//img30.360buyimg.com/sku/jfs/t1/162197/1/24849/145104/61a1c535E8e7e5b6c/481d15101a8440f1.jpg); height:753px}
    .ssd-module-wrap .M163799174521525{750px; background-color:#cbcbcb; background-size:100% 100%; background-image:url(//img30.360buyimg.com/sku/jfs/t1/210418/22/10692/214738/61a1c535E1b5ff7e9/a4952b3b3c854a7a.jpg); height:550px}
    .ssd-module-wrap .M163799174556627{750px; background-color:#cbcbcb; background-size:100% 100%; background-image:url(//img30.360buyimg.com/sku/jfs/t1/205122/30/16557/168287/61a1c535Ec063a7d4/a02c165057493ee0.jpg); height:659px}
    .ssd-module-wrap .M163799174608129{750px; background-color:#e9e9e9; background-size:100% 100%; background-image:url(//img30.360buyimg.com/sku/jfs/t1/217122/18/5800/81094/61a1c535E155c4d47/25a16b9f35cb99bf.jpg); height:554px}
    .ssd-module-wrap .M163799174648130{750px; background-color:#e9e9e9; background-size:100% 100%; background-image:url(//img30.360buyimg.com/sku/jfs/t1/173662/13/21888/155649/61a1c535E7eb0fa91/a7ad5cc645ce06bb.jpg); height:733px}
    .ssd-module-wrap .M163799174690032{750px; background-color:#cbcbcb; background-size:100% 100%; background-image:url(//img30.360buyimg.com/sku/jfs/t1/200211/2/18528/263821/61a1c536E51eebf8c/52acaab4026683cf.jpg); height:1164px}
    .ssd-module-wrap .M163799174731033{750px; background-color:#d7d7d7; background-size:100% 100%; background-image:url(//img30.360buyimg.com/sku/jfs/t1/142253/2/21632/169534/61a1c535E36c889c7/8726b190f67bbbcb.jpg); height:977px}
    .ssd-module-wrap .M163799174776534{750px; background-color:#cbcbcb; background-size:100% 100%; background-image:url(//img30.360buyimg.com/sku/jfs/t1/211260/8/10310/126805/61a1c535E69bfc717/681c91b63b8c1070.jpg); height:643px}
    .ssd-module-wrap .M163799174829535{750px; background-color:#cbcbcb; background-size:100% 100%; background-image:url(//img30.360buyimg.com/sku/jfs/t1/214408/13/5828/127956/61a1c535E408daa20/ac9569f5cafb6db0.jpg); height:619px}
    .ssd-module-wrap .M163799174869337{750px; background-color:#b3b3b3; background-size:100% 100%; background-image:url(//img30.360buyimg.com/sku/jfs/t1/140225/29/21738/51931/61a1c535Ebd0b3675/cff4c682f596ab7c.jpg); height:515px}
    .ssd-module-wrap .M163799174896138{750px; background-color:#b3b3b3; background-size:100% 100%; background-image:url(//img30.360buyimg.com/sku/jfs/t1/198131/32/18792/156561/61a1c535Ec1b17976/a806c5d7e077a3a4.jpg); height:1413px}
    .ssd-module-wrap .M163799174937540{750px; background-color:#e9e9e9; background-size:100% 100%; background-image:url(//img30.360buyimg.com/sku/jfs/t1/172974/37/21558/53051/61a1c535E97f3c0cc/f0275dbee82a96aa.jpg); height:555px}
    .ssd-module-wrap .M163799174976241{750px; background-color:#f2f2f2; background-size:100% 100%; background-image:url(//img30.360buyimg.com/sku/jfs/t1/218901/7/5890/105824/61a1c535Ea9058603/43ec79e23c473feb.jpg); height:781px}
    .ssd-module-wrap .M163799175020642{750px; background-color:#f2f2f2; background-size:100% 100%; background-image:url(//img30.360buyimg.com/sku/jfs/t1/137697/28/21348/117778/61a1c535E06712629/f2185337949c5500.jpg); height:949px}
    .ssd-module-wrap .M163799175061644{750px; background-color:#d7d7d7; background-size:100% 100%; background-image:url(//img30.360buyimg.com/sku/jfs/t1/156394/9/25543/103799/61a1c535Ef7ea558b/ecf0ae1994878045.jpg); height:830px}
    .ssd-module-wrap .M163799175098245{750px; background-color:#f2f2f2; background-size:100% 100%; background-image:url(//img30.360buyimg.com/sku/jfs/t1/219234/17/5875/79255/61a1c535E4701e854/74caea871ad58c6f.jpg); height:596px}
    .ssd-module-wrap .M163799175127846{750px; background-color:#cbcbcb; background-size:100% 100%; background-image:url(//img30.360buyimg.com/sku/jfs/t1/206026/32/16250/112112/61a1c535Eadcee4ce/9b65a761fbaf3a53.jpg); height:1117px}
    .ssd-module-wrap .M163799175188047{750px; background-color:#e9e9e9; background-size:100% 100%; background-image:url(//img30.360buyimg.com/sku/jfs/t1/117891/1/21038/89394/61a1c535E56dea8d2/b592e7f2421a65c7.jpg); height:831px}
    .ssd-module-wrap .M163799175234948{750px; background-color:#cbcbcb; background-size:100% 100%; background-image:url(//img30.360buyimg.com/sku/jfs/t1/141693/32/21489/342646/61a1c536E68862ed8/ac7c5289422b8c9a.jpg); height:1364px}
    .ssd-module-wrap .M163799175292349{750px; background-color:#d7d7d7; background-size:100% 100%; background-image:url(//img30.360buyimg.com/sku/jfs/t1/217105/11/5871/423420/61a1c536E9c3470e8/5fecd0744d65c869.jpg); height:1716px}
    

     

    实现 方法通过正则表达式 进行抓取

    public static List<image> GetJDDetailImages(string num_id) {
                List<image> images = new List<image>();
                try
                {
                    string url = "https://sku-market-gw.jd.com/css/pc/"+ num_id + ".css";
                    string result = LXFrame.HttpPost(url, "");
                    string regex = "(//.+?.jpg)";
    
                    var signedUrl = Regex.Match(result, regex);
                    MatchCollection Matchs = Regex.Matches(result, regex);                
                    foreach (Match m in Matchs)
                    {
                        image img = new image();
                        img.img = m.Value;
                        images.Add(img);
                    }
                    return images;
                }
                catch (Exception)
                {
                    return images;
                }
            }
  • 相关阅读:
    洛谷 P2958 [USACO09OCT]木瓜的丛林Papaya Jungle
    洛谷 P1400 塔
    10-2 集合之List
    主从数据库
    【单元测试】
    Pen Editor
    appendGrid
    动画
    JavaScript框架设计 第14章 动画引擎
    >>>
  • 原文地址:https://www.cnblogs.com/dyd520/p/15688114.html
Copyright © 2020-2023  润新知