网页UI以及HTML组织形式,目的是抓取网页数据并解析。
<div class="clan__table"> <div class="clan__headers"> <div class="clan__headerCaption">Rank</div> <div class="clan__headerCaption">Name</div> <div class="clan__headerCaption">Level</div> <div class="clan__headerCaption">League</div> <div class="clan__headerCaption">Trophies</div> <div class="clan__headerCaption">Donations</div> <div class="clan__headerCaption">Role</div> </div> <div class="clan__rowContainer"> <div class="clan__row"> #1 </div> <div class="clan__row"> <a class="ui__blueLink" href="/profile/2P0V2CCY">北斗</a> </div> <div class="clan__row"> <span class="clan__playerLevel">11</span> </div> <div class="clan__row"> <div class="clan__leagueContainer"> <div class="league__2"></div> </div> </div> <div class="clan__row"> <div class="clan__cup">4438</div> </div> <div class="clan__row">379</div> <div class="clan__row"> Leader </div> </div> <div class="clan__rowContainer"> <div class="clan__row"> #2 </div> <div class="clan__row"> <a class="ui__blueLink" href="/profile/9UURJRQU">wglj</a> </div> <div class="clan__row"> <span class="clan__playerLevel">12</span> </div> <div class="clan__row"> <div class="clan__leagueContainer"> <div class="league__2"></div> </div> </div> <div class="clan__row"> <div class="clan__cup">4344</div> </div> <div class="clan__row">498</div> <div class="clan__row"> Co-Leader </div> </div> <div class="clan__rowContainer"> <div class="clan__row"> #3 </div> <div class="clan__row"> <a class="ui__blueLink" href="/profile/2LQYLYJQ">大彪客</a> </div> <div class="clan__row"> <span class="clan__playerLevel">11</span> </div> <div class="clan__row"> <div class="clan__leagueContainer"> <div class="league__1"></div> </div> </div> <div class="clan__row"> <div class="clan__cup">4276</div> </div> <div class="clan__row">322</div> <div class="clan__row"> Co-Leader </div> </div> <div class="clan__rowContainer"> <div class="clan__row"> #4 </div> <div class="clan__row"> <a class="ui__blueLink" href="/profile/9PLUY020">冰城好警</a> </div> <div class="clan__row"> <span class="clan__playerLevel">12</span> </div> <div class="clan__row"> <div class="clan__leagueContainer"> <div class="league__1"></div> </div> </div> <div class="clan__row"> <div class="clan__cup">4229</div> </div> <div class="clan__row">264</div> <div class="clan__row"> Co-Leader </div> </div> <div class="clan__rowContainer"> <div class="clan__row"> #5 </div> <div class="clan__row"> <a class="ui__blueLink" href="/profile/2L9UPJP0">你可以的</a> </div> <div class="clan__row"> <span class="clan__playerLevel">12</span> </div> <div class="clan__row"> <div class="clan__leagueContainer"> <div class="league__1"></div> </div> </div> <div class="clan__row"> <div class="clan__cup">4220</div> </div> <div class="clan__row">380</div> <div class="clan__row"> Co-Leader </div> </div> <div class="clan__rowContainer"> <div class="clan__row"> #6 </div> <div class="clan__row"> <a class="ui__blueLink" href="/profile/9U8QLY9V">cavan_陈</a> </div> <div class="clan__row"> <span class="clan__playerLevel">11</span> </div> <div class="clan__row"> <div class="clan__leagueContainer"> <div class="league__1"></div> </div> </div> <div class="clan__row"> <div class="clan__cup">4205</div> </div> <div class="clan__row">204</div> <div class="clan__row"> Co-Leader </div> </div> <div class="clan__rowContainer"> <div class="clan__row"> #7 </div> <div class="clan__row"> <a class="ui__blueLink" href="/profile/YUJYLJJ">小新</a> </div> <div class="clan__row"> <span class="clan__playerLevel">11</span> </div> <div class="clan__row"> <div class="clan__leagueContainer"> <div class="league__1"></div> </div> </div> <div class="clan__row"> <div class="clan__cup">4171</div> </div> <div class="clan__row">308</div> <div class="clan__row"> Co-Leader </div> </div> <div class="clan__rowContainer"> <div class="clan__row"> #8 </div> <div class="clan__row"> <a class="ui__blueLink" href="/profile/PL9VU80U">指挥若定</a> </div> <div class="clan__row"> <span class="clan__playerLevel">11</span> </div> <div class="clan__row"> <div class="clan__leagueContainer"> <div class="league__1"></div> </div> </div> <div class="clan__row"> <div class="clan__cup">4154</div> </div> <div class="clan__row">186</div> <div class="clan__row"> Co-Leader </div> </div> <div class="clan__rowContainer"> <div class="clan__row"> #9 </div> <div class="clan__row"> <a class="ui__blueLink" href="/profile/8RLQJQRR">hwj</a> </div> <div class="clan__row"> <span class="clan__playerLevel">10</span> </div> <div class="clan__row"> <div class="clan__leagueContainer"> <div class="league__1"></div> </div> </div> <div class="clan__row"> <div class="clan__cup">4023</div> </div> <div class="clan__row">48</div> <div class="clan__row"> Elder </div> </div> <div class="clan__rowContainer"> <div class="clan__row"> #10 </div> <div class="clan__row"> <a class="ui__blueLink" href="/profile/QQUV9RR9">路飞</a> </div> <div class="clan__row"> <span class="clan__playerLevel">11</span> </div> <div class="clan__row"> <div class="clan__leagueContainer"> <div class="league__1"></div> </div> </div> <div class="clan__row"> <div class="clan__cup">4000</div> </div> <div class="clan__row">202</div> <div class="clan__row"> Co-Leader </div> </div> <div class="clan__rowContainer"> <div class="clan__row"> #11 </div> <div class="clan__row"> <a class="ui__blueLink" href="/profile/20RRU0LJ2">奥格瑞玛</a> </div> <div class="clan__row"> <span class="clan__playerLevel">11</span> </div> <div class="clan__row"> <div class="clan__leagueContainer"> <div class="league__0"></div> </div> </div> <div class="clan__row"> <div class="clan__cup">3893</div> </div> <div class="clan__row">470</div> <div class="clan__row"> Co-Leader </div> </div> <div class="clan__rowContainer"> <div class="clan__row"> #12 </div> <div class="clan__row"> <a class="ui__blueLink" href="/profile/LCP9CL8C">Subway</a> </div> <div class="clan__row"> <span class="clan__playerLevel">11</span> </div> <div class="clan__row"> <div class="clan__leagueContainer"> <div class="league__0"></div> </div> </div> <div class="clan__row"> <div class="clan__cup">3882</div> </div> <div class="clan__row">72</div> <div class="clan__row"> Co-Leader </div> </div> <div class="clan__rowContainer"> <div class="clan__row"> #13 </div> <div class="clan__row"> <a class="ui__blueLink" href="/profile/8Q2J8LVP">会飞の鱼</a> </div> <div class="clan__row"> <span class="clan__playerLevel">11</span> </div> <div class="clan__row"> <div class="clan__leagueContainer"> <div class="league__0"></div> </div> </div> <div class="clan__row"> <div class="clan__cup">3873</div> </div> <div class="clan__row">199</div> <div class="clan__row"> Co-Leader </div> </div> <div class="clan__rowContainer"> <div class="clan__row"> #14 </div> <div class="clan__row"> <a class="ui__blueLink" href="/profile/QY2Y9R0J">柔柔bb</a> </div> <div class="clan__row"> <span class="clan__playerLevel">11</span> </div> <div class="clan__row"> <div class="clan__leagueContainer"> <div class="league__0"></div> </div> </div> <div class="clan__row"> <div class="clan__cup">3862</div> </div> <div class="clan__row">178</div> <div class="clan__row"> Co-Leader </div> </div> <div class="clan__rowContainer"> <div class="clan__row"> #15 </div> <div class="clan__row"> <a class="ui__blueLink" href="/profile/U2R2LGR2">北斗</a> </div> <div class="clan__row"> <span class="clan__playerLevel">10</span> </div> <div class="clan__row"> <div class="clan__leagueContainer"> <div class="league__0"></div> </div> </div> <div class="clan__row"> <div class="clan__cup">3812</div> </div> <div class="clan__row">38</div> <div class="clan__row"> Co-Leader </div> </div> <div class="clan__rowContainer"> <div class="clan__row"> #16 </div> <div class="clan__row"> <a class="ui__blueLink" href="/profile/QGVYJCYG">Paul</a> </div> <div class="clan__row"> <span class="clan__playerLevel">10</span> </div> <div class="clan__row"> <div class="clan__leagueContainer"> <div class="league__0"></div> </div> </div> <div class="clan__row"> <div class="clan__cup">3769</div> </div> <div class="clan__row">42</div> <div class="clan__row"> Elder </div> </div> <div class="clan__rowContainer"> <div class="clan__row"> #17 </div> <div class="clan__row"> <a class="ui__blueLink" href="/profile/92Q29R0U">天黑</a> </div> <div class="clan__row"> <span class="clan__playerLevel">10</span> </div> <div class="clan__row"> <div class="clan__leagueContainer"> <div class="league__0"></div> </div> </div> <div class="clan__row"> <div class="clan__cup">3692</div> </div> <div class="clan__row">100</div> <div class="clan__row"> Elder </div> </div> <div class="clan__rowContainer"> <div class="clan__row"> #18 </div> <div class="clan__row"> <a class="ui__blueLink" href="/profile/92QLQPUU">Addison Liu</a> </div> <div class="clan__row"> <span class="clan__playerLevel">11</span> </div> <div class="clan__row"> <div class="clan__leagueContainer"> <div class="league__0"></div> </div> </div> <div class="clan__row"> <div class="clan__cup">3656</div> </div> <div class="clan__row">240</div> <div class="clan__row"> Co-Leader </div> </div> <div class="clan__rowContainer"> <div class="clan__row"> #19 </div> <div class="clan__row"> <a class="ui__blueLink" href="/profile/YQRPCJ9P">系统奖励</a> </div> <div class="clan__row"> <span class="clan__playerLevel">11</span> </div> <div class="clan__row"> <div class="clan__leagueContainer"> <div class="league__0"></div> </div> </div> <div class="clan__row"> <div class="clan__cup">3615</div> </div> <div class="clan__row">376</div> <div class="clan__row"> Co-Leader </div> </div> <div class="clan__rowContainer"> <div class="clan__row"> #20 </div> <div class="clan__row"> <a class="ui__blueLink" href="/profile/JUGJ88GP">二牛和小姨子</a> </div> <div class="clan__row"> <span class="clan__playerLevel">9</span> </div> <div class="clan__row"> <div class="clan__leagueContainer"> <div class="league__0"></div> </div> </div> <div class="clan__row"> <div class="clan__cup">3550</div> </div> <div class="clan__row">384</div> <div class="clan__row"> Co-Leader </div> </div> <div class="clan__rowContainer"> <div class="clan__row"> #21 </div> <div class="clan__row"> <a class="ui__blueLink" href="/profile/80GUU0U2">阿牛someone</a> </div> <div class="clan__row"> <span class="clan__playerLevel">11</span> </div> <div class="clan__row"> <div class="clan__leagueContainer"> <div class="league__0"></div> </div> </div> <div class="clan__row"> <div class="clan__cup">3514</div> </div> <div class="clan__row">74</div> <div class="clan__row"> Elder </div> </div> <div class="clan__rowContainer"> <div class="clan__row"> #22 </div> <div class="clan__row"> <a class="ui__blueLink" href="/profile/GPGLJ0C">森林大地</a> </div> <div class="clan__row"> <span class="clan__playerLevel">10</span> </div> <div class="clan__row"> <div class="clan__leagueContainer"> <div class="league__0"></div> </div> </div> <div class="clan__row"> <div class="clan__cup">3480</div> </div> <div class="clan__row">188</div> <div class="clan__row"> Co-Leader </div> </div> <div class="clan__rowContainer"> <div class="clan__row"> #23 </div> <div class="clan__row"> <a class="ui__blueLink" href="/profile/2L29R2V8">george</a> </div> <div class="clan__row"> <span class="clan__playerLevel">11</span> </div> <div class="clan__row"> <div class="clan__leagueContainer"> <div class="league__0"></div> </div> </div> <div class="clan__row"> <div class="clan__cup">3459</div> </div> <div class="clan__row">166</div> <div class="clan__row"> Co-Leader </div> </div> <div class="clan__rowContainer"> <div class="clan__row"> #24 </div> <div class="clan__row"> <a class="ui__blueLink" href="/profile/UPPGLURG">Big Bang is VIP</a> </div> <div class="clan__row"> <span class="clan__playerLevel">10</span> </div> <div class="clan__row"> <div class="clan__leagueContainer"> <div class="league__0"></div> </div> </div> <div class="clan__row"> <div class="clan__cup">3380</div> </div> <div class="clan__row">92</div> <div class="clan__row"> Co-Leader </div> </div> <div class="clan__rowContainer"> <div class="clan__row"> #25 </div> <div class="clan__row"> <a class="ui__blueLink" href="/profile/22GUQYV8Y">佐为</a> </div> <div class="clan__row"> <span class="clan__playerLevel">10</span> </div> <div class="clan__row"> <div class="clan__leagueContainer"> <div class="league__0"></div> </div> </div> <div class="clan__row"> <div class="clan__cup">3305</div> </div> <div class="clan__row">43</div> <div class="clan__row"> Member </div> </div> <div class="clan__rowContainer"> <div class="clan__row"> #26 </div> <div class="clan__row"> <a class="ui__blueLink" href="/profile/2PLQQLPC">X-HUNTER</a> </div> <div class="clan__row"> <span class="clan__playerLevel">11</span> </div> <div class="clan__row"> <div class="clan__leagueContainer"> <div class="league__0"></div> </div> </div> <div class="clan__row"> <div class="clan__cup">3264</div> </div> <div class="clan__row">168</div> <div class="clan__row"> Co-Leader </div> </div> <div class="clan__rowContainer"> <div class="clan__row"> #27 </div> <div class="clan__row"> <a class="ui__blueLink" href="/profile/UG8JCJ8C">拾蛤蜊</a> </div> <div class="clan__row"> <span class="clan__playerLevel">10</span> </div> <div class="clan__row"> <div class="clan__leagueContainer"> <div class="league__0"></div> </div> </div> <div class="clan__row"> <div class="clan__cup">3253</div> </div> <div class="clan__row">300</div> <div class="clan__row"> Co-Leader </div> </div> <div class="clan__rowContainer"> <div class="clan__row"> #28 </div> <div class="clan__row"> <a class="ui__blueLink" href="/profile/229J9U2GR">RT</a> </div> <div class="clan__row"> <span class="clan__playerLevel">10</span> </div> <div class="clan__row"> <div class="clan__leagueContainer"> <div class="league__0"></div> </div> </div> <div class="clan__row"> <div class="clan__cup">3230</div> </div> <div class="clan__row">108</div> <div class="clan__row"> Elder </div> </div> <div class="clan__rowContainer"> <div class="clan__row"> #29 </div> <div class="clan__row"> <a class="ui__blueLink" href="/profile/U22L0GGQ">忍者老宝</a> </div> <div class="clan__row"> <span class="clan__playerLevel">11</span> </div> <div class="clan__row"> <div class="clan__leagueContainer"> <div class="league__0"></div> </div> </div> <div class="clan__row"> <div class="clan__cup">3200</div> </div> <div class="clan__row">64</div> <div class="clan__row"> Elder </div> </div> <div class="clan__rowContainer"> <div class="clan__row"> #30 </div> <div class="clan__row"> <a class="ui__blueLink" href="/profile/CCGLGGJC">RT</a> </div> <div class="clan__row"> <span class="clan__playerLevel">10</span> </div> <div class="clan__row"> <div class="clan__leagueContainer"> <div class="league__0"></div> </div> </div> <div class="clan__row"> <div class="clan__cup">3196</div> </div> <div class="clan__row">244</div> <div class="clan__row"> Elder </div> </div> <div class="clan__rowContainer"> <div class="clan__row"> #31 </div> <div class="clan__row"> <a class="ui__blueLink" href="/profile/8YL9LJLC">林GHL</a> </div> <div class="clan__row"> <span class="clan__playerLevel">10</span> </div> <div class="clan__row"> <div class="clan__leagueContainer"> <div class="league__0"></div> </div> </div> <div class="clan__row"> <div class="clan__cup">3147</div> </div> <div class="clan__row">341</div> <div class="clan__row"> Co-Leader </div> </div> <div class="clan__rowContainer"> <div class="clan__row"> #32 </div> <div class="clan__row"> <a class="ui__blueLink" href="/profile/Y8CJQGVR">一生註定是學渣</a> </div> <div class="clan__row"> <span class="clan__playerLevel">10</span> </div> <div class="clan__row"> <div class="clan__leagueContainer"> <div class="league__0"></div> </div> </div> <div class="clan__row"> <div class="clan__cup">3030</div> </div> <div class="clan__row">0</div> <div class="clan__row"> Co-Leader </div> </div> <div class="clan__rowContainer"> <div class="clan__row"> #33 </div> <div class="clan__row"> <a class="ui__blueLink" href="/profile/2229LG9PG">万小宝</a> </div> <div class="clan__row"> <span class="clan__playerLevel">9</span> </div> <div class="clan__row"> <div class="clan__leagueContainer"> <div class="league__0"></div> </div> </div> <div class="clan__row"> <div class="clan__cup">3014</div> </div> <div class="clan__row">10</div> <div class="clan__row"> Member </div> </div> <div class="clan__rowContainer"> <div class="clan__row"> #34 </div> <div class="clan__row"> <a class="ui__blueLink" href="/profile/8PQRCULJ">sakura怡</a> </div> <div class="clan__row"> <span class="clan__playerLevel">10</span> </div> <div class="clan__row"> <div class="clan__leagueContainer"> <div class="league__0"></div> </div> </div> <div class="clan__row"> <div class="clan__cup">2846</div> </div> <div class="clan__row">32</div> <div class="clan__row"> Elder </div> </div> <div class="clan__rowContainer"> <div class="clan__row"> #35 </div> <div class="clan__row"> <a class="ui__blueLink" href="/profile/9YC2LUPR">King丶梦屹</a> </div> <div class="clan__row"> <span class="clan__playerLevel">9</span> </div> <div class="clan__row"> <div class="clan__leagueContainer"> <div class="league__0"></div> </div> </div> <div class="clan__row"> <div class="clan__cup">2841</div> </div> <div class="clan__row">286</div> <div class="clan__row"> Elder </div> </div> <div class="clan__rowContainer"> <div class="clan__row"> #36 </div> <div class="clan__row"> <a class="ui__blueLink" href="/profile/V8QQ8V29">骚铭之父</a> </div> <div class="clan__row"> <span class="clan__playerLevel">9</span> </div> <div class="clan__row"> <div class="clan__leagueContainer"> <div class="league__0"></div> </div> </div> <div class="clan__row"> <div class="clan__cup">2811</div> </div> <div class="clan__row">20</div> <div class="clan__row"> Member </div> </div> <div class="clan__rowContainer"> <div class="clan__row"> #37 </div> <div class="clan__row"> <a class="ui__blueLink" href="/profile/88Y9RPLP2">1L领域</a> </div> <div class="clan__row"> <span class="clan__playerLevel">9</span> </div> <div class="clan__row"> <div class="clan__leagueContainer"> <div class="league__0"></div> </div> </div> <div class="clan__row"> <div class="clan__cup">2806</div> </div> <div class="clan__row">158</div> <div class="clan__row"> Co-Leader </div> </div> <div class="clan__rowContainer"> <div class="clan__row"> #38 </div> <div class="clan__row"> <a class="ui__blueLink" href="/profile/28JR0VPP9">СаНёК</a> </div> <div class="clan__row"> <span class="clan__playerLevel">9</span> </div> <div class="clan__row"> <div class="clan__leagueContainer"> <div class="league__0"></div> </div> </div> <div class="clan__row"> <div class="clan__cup">2785</div> </div> <div class="clan__row">60</div> <div class="clan__row"> Member </div> </div> <div class="clan__rowContainer"> <div class="clan__row"> #39 </div> <div class="clan__row"> <a class="ui__blueLink" href="/profile/28R0J0JR2">aqil</a> </div> <div class="clan__row"> <span class="clan__playerLevel">10</span> </div> <div class="clan__row"> <div class="clan__leagueContainer"> <div class="league__0"></div> </div> </div> <div class="clan__row"> <div class="clan__cup">2753</div> </div> <div class="clan__row">34</div> <div class="clan__row"> Member </div> </div> <div class="clan__rowContainer"> <div class="clan__row"> #40 </div> <div class="clan__row"> <a class="ui__blueLink" href="/profile/CQ0VPJJL">#Pepapig</a> </div> <div class="clan__row"> <span class="clan__playerLevel">8</span> </div> <div class="clan__row"> <div class="clan__leagueContainer"> <div class="league__0"></div> </div> </div> <div class="clan__row"> <div class="clan__cup">2744</div> </div> <div class="clan__row">20</div> <div class="clan__row"> Member </div> </div> <div class="clan__rowContainer"> <div class="clan__row"> #41 </div> <div class="clan__row"> <a class="ui__blueLink" href="/profile/YCGVRJ02">mohinka</a> </div> <div class="clan__row"> <span class="clan__playerLevel">9</span> </div> <div class="clan__row"> <div class="clan__leagueContainer"> <div class="league__0"></div> </div> </div> <div class="clan__row"> <div class="clan__cup">2656</div> </div> <div class="clan__row">108</div> <div class="clan__row"> Member </div> </div> <div class="clan__rowContainer"> <div class="clan__row"> #42 </div> <div class="clan__row"> <a class="ui__blueLink" href="/profile/2JRCC2LY9">Ben先生</a> </div> <div class="clan__row"> <span class="clan__playerLevel">8</span> </div> <div class="clan__row"> <div class="clan__leagueContainer"> <div class="league__0"></div> </div> </div> <div class="clan__row"> <div class="clan__cup">2655</div> </div> <div class="clan__row">116</div> <div class="clan__row"> Co-Leader </div> </div> <div class="clan__rowContainer"> <div class="clan__row"> #43 </div> <div class="clan__row"> <a class="ui__blueLink" href="/profile/L8GR8Q9J">寂寞真离骚l</a> </div> <div class="clan__row"> <span class="clan__playerLevel">8</span> </div> <div class="clan__row"> <div class="clan__leagueContainer"> <div class="league__0"></div> </div> </div> <div class="clan__row"> <div class="clan__cup">2625</div> </div> <div class="clan__row">30</div> <div class="clan__row"> Elder </div> </div> <div class="clan__rowContainer"> <div class="clan__row"> #44 </div> <div class="clan__row"> <a class="ui__blueLink" href="/profile/VRRY8PUC">路海战队</a> </div> <div class="clan__row"> <span class="clan__playerLevel">10</span> </div> <div class="clan__row"> <div class="clan__leagueContainer"> <div class="league__0"></div> </div> </div> <div class="clan__row"> <div class="clan__cup">2623</div> </div> <div class="clan__row">0</div> <div class="clan__row"> Member </div> </div> <div class="clan__rowContainer"> <div class="clan__row"> #45 </div> <div class="clan__row"> <a class="ui__blueLink" href="/profile/PVQY29QL">Supergirl</a> </div> <div class="clan__row"> <span class="clan__playerLevel">10</span> </div> <div class="clan__row"> <div class="clan__leagueContainer"> <div class="league__0"></div> </div> </div> <div class="clan__row"> <div class="clan__cup">2544</div> </div> <div class="clan__row">0</div> <div class="clan__row"> Member </div> </div> <div class="clan__rowContainer"> <div class="clan__row"> #46 </div> <div class="clan__row"> <a class="ui__blueLink" href="/profile/G0GQQ809">三刀索隆</a> </div> <div class="clan__row"> <span class="clan__playerLevel">10</span> </div> <div class="clan__row"> <div class="clan__leagueContainer"> <div class="league__0"></div> </div> </div> <div class="clan__row"> <div class="clan__cup">2542</div> </div> <div class="clan__row">0</div> <div class="clan__row"> Member </div> </div> <div class="clan__rowContainer"> <div class="clan__row"> #47 </div> <div class="clan__row"> <a class="ui__blueLink" href="/profile/8JGY8R0C">York royale</a> </div> <div class="clan__row"> <span class="clan__playerLevel">9</span> </div> <div class="clan__row"> <div class="clan__leagueContainer"> <div class="league__0"></div> </div> </div> <div class="clan__row"> <div class="clan__cup">2472</div> </div> <div class="clan__row">0</div> <div class="clan__row"> Elder </div> </div> <div class="clan__rowContainer"> <div class="clan__row"> #48 </div> <div class="clan__row"> <a class="ui__blueLink" href="/profile/2QR080LCV">famidore</a> </div> <div class="clan__row"> <span class="clan__playerLevel">10</span> </div> <div class="clan__row"> <div class="clan__leagueContainer"> <div class="league__0"></div> </div> </div> <div class="clan__row"> <div class="clan__cup">2443</div> </div> <div class="clan__row">88</div> <div class="clan__row"> Member </div> </div> <div class="clan__rowContainer"> <div class="clan__row"> #49 </div> <div class="clan__row"> <a class="ui__blueLink" href="/profile/2VVY9VG"># vj</a> </div> <div class="clan__row"> <span class="clan__playerLevel">9</span> </div> <div class="clan__row"> <div class="clan__leagueContainer"> <div class="league__0"></div> </div> </div> <div class="clan__row"> <div class="clan__cup">2371</div> </div> <div class="clan__row">0</div> <div class="clan__row"> Member </div> </div> <div class="clan__rowContainer"> <div class="clan__row"> #50 </div> <div class="clan__row"> <a class="ui__blueLink" href="/profile/JVCU0Q0V">Forever丿old8</a> </div> <div class="clan__row"> <span class="clan__playerLevel">9</span> </div> <div class="clan__row"> <div class="clan__leagueContainer"> <div class="league__0"></div> </div> </div> <div class="clan__row"> <div class="clan__cup">2349</div> </div> <div class="clan__row">40</div> <div class="clan__row"> Member </div> </div> </div>
通过查看页面源代码,我们发现每一个玩家信息都是存储在一个class为clan__rowContainer的div中。
那么我们就可以通过soup的finaAll选择器来获取所有行的玩家信息,然后遍历挨个解析玩家数据。
具体代码:
for i, row in enumerate(soup.findAll("div",attrs = {"class":"clan__rowContainer"})): user_dict = {} for j,col in enumerate(row.findAll("div",attrs = {"class":"clan__row"})): if j == 0: user_dict["rank"] = col.string.strip().replace("#","") elif j == 1: user_dict["name"] = col.a.string.strip() user_dict["uid"] = col.a.get("href").strip("/profile/") elif j == 2: user_dict["level"] = col.span.string.strip() elif j == 3: user_dict["league"] = col.contents[1].div.get("class")[0].replace("league__","") elif j == 4: user_dict["score"] = col.div.string.strip() elif j == 5: user_dict["donations"] = col.string.strip() elif j == 6: user_dict["role"] = col.string.strip() print(user_dict)
相关推荐
在进行网页数据抓取时,经常需要用到Python的BeautifulSoup库来解析HTML文档,并从中提取有用的信息。在本篇文章中,我们将详细介绍如何使用Python 3结合BeautifulSoup来抓取特定的`div`标签及其内部的数据。通过...
本文将详细介绍如何利用Python和`BeautifulSoup`库进行网页数据抓取的基本步骤。 #### 二、准备工作 1. **环境搭建**: - 首先需要确保Python环境已经安装好。 - 接下来需要安装`BeautifulSoup`库。如果还没有...
本主题将深入探讨如何使用Python进行网页数据抓取,并介绍如何利用这些数据创建表格,同时涉及CSS文件的生成和字体的修改。 首先,网页数据抓取是通过Python中的库如BeautifulSoup或Scrapy来实现的。BeautifulSoup...
在Python中,网页数据抓取和解析是一项常见的任务,尤其...通过本文的介绍,希望你能对BeautifulSoup在Python网页解析中的应用有一个全面的了解,并能够在实际工作中灵活运用这些工具来解决网页数据抓取和解析的问题。
通过理解和运用这些工具,开发者能够高效地抓取和解析网页数据,即使在需要登录的情况下也不例外。在实际项目中,还应考虑遵守网站的robots.txt文件,尊重网站的爬虫政策,确保合法和道德的爬虫行为。
本篇文章将详细介绍如何使用Python结合BeautifulSoup来抓取网页上的指定内容。 首先,要使用BeautifulSoup,需要导入必要的库。在Python中,`urllib2`库用于打开和读取网页,而`BeautifulSoup`则是解析网页内容的...
python爬虫实例 requests+beautifulsoup4解析 HTML 页面一个简单的网页上抓取标题和链接 Python 爬虫是一种自动化程序,用于从网站上抓取数据。这里我将提供一个简单的 Python 爬虫实例,使用 requests 库来发送 ...
### Python利用BeautifulSoup解析HTML的方法详解 #### 一、概述 在现代Web开发与数据分析领域,数据抓取是一项重要的技能。对于Python开发者来说,BeautifulSoup是一个不可或缺的工具库,它能够帮助开发者轻松地从...
使用场景及目标:学习如何使用 requests 和 BeautifulSoup 进行简单的网页爬虫开发,获取特定网站的数据。 阅读建议:读者可以在自己的环境中运行示例代码,并结合本文提供的详细解释进行练习,同时注意遵守网站的...
BeautifulSoup是一个用于解析HTML和XML文档的库,能够帮助开发者快速地从网页中抓取所需数据。 首先,要使用BeautifulSoup库进行网页分析,必须先安装该库。可以通过pip命令安装:`pip install beautifulsoup4`。...
Python网页信息抓取是利用编程技术从互联网上自动提取数据的一种方法,主要应用于数据分析、市场研究、搜索引擎优化等领域。在本教程中,我们将探讨如何使用Python进行web scraping,特别是通过Jupyter Notebook进行...
本文将详细介绍如何利用Python结合BeautifulSoup库来解析HTML文档,特别是针对爬虫应用。 #### 安装BeautifulSoup和Requests 1. **BeautifulSoup的安装** 要使用BeautifulSoup,首先需要确保其已经安装。可以...
本实例将深入探讨如何使用Python的BeautifulSoup库与urllib.request模块来实现一个基本的网页抓取功能。 首先,`urllib.request`是Python标准库中的一个模块,用于处理URL相关的请求。在爬虫领域,它主要负责发起...
Python 网页抓取是指使用 Python 语言从互联网上抓取数据的过程。该技术广泛应用于数据挖掘、机器学习、自然语言处理等领域。下面是 Python 网页抓取的详细讲解: 一、为什么需要网页抓取 网页抓取可以帮助我们从...
总的来说,通过结合`requests`、`beautifulsoup4`、`pdfkit`和`PyPDF2`,我们可以轻松地实现从HTML网页抓取内容并保存为PDF的功能,这对于数据分析、文档整理或者自动化报告生成等场景都非常实用。
BeautifulSoup是Python中的一款HTML和XML解析库,用于抓取网页内容。它能够帮助开发者方便地解析HTML和XML文档,找到并提取所需的数据。在这个项目中,BeautifulSoup用于解析网页源代码,定位到图片链接。 **HTTP和...
BeautifulSoup是Python中一个强大的HTML和XML解析库,常用于网页抓取和数据提取。Oracle和MySQL则是两种流行的数据库管理系统,它们被广泛应用于企业级的数据存储和管理。 首先,我们来详细了解BeautifulSoup库。...
Python的BeautifulSoup库是网页抓取(Web Scraping)领域中的一个重要工具,它主要用于解析HTML和XML文档。这个库使得处理复杂或不规则的HTML结构变得简单易行。在这个"Python BeautifulSoup简单示例"中,我们将探讨...