library(XML)
url="http://stats.espncricinfo.com/ci/engine/stats/index.html?class=1;team=8;template=results;type=batting"
#Note I can also break the url string and use paste command to modify this url with parameters
tables=readHTMLTable(url)
tables$"Overall figures"
## Player Span Mat Inns NO Runs HS Ave 100 50 0
## 1 KC Sangakkara 2000-2015 134 233 17 12400 319 57.40 38 52 11
## 2 DPMD Jayawardene 1997-2014 149 252 15 11814 374 49.84 34 50 15
## 3 ST Jayasuriya 1991-2007 110 188 14 6973 340 40.07 14 31 15
## 4 PA de Silva 1984-2002 93 159 11 6361 267 42.97 20 22 7
## 5 MS Atapattu 1990-2007 90 156 15 5502 249 39.02 16 17 22
## 6 TM Dilshan 1999-2013 87 145 11 5492 193 40.98 16 23 14
## 7 TT Samaraweera 2001-2013 81 132 20 5462 231 48.76 14 30 11
## 8 A Ranatunga 1982-2000 93 155 12 5105 135* 35.69 4 38 12
## 9 HP Tillakaratne 1989-2004 83 131 25 4545 204* 42.87 11 20 9
## 10 AD Mathews 2009-2015 52 90 17 3801 160 52.06 7 22 1
## 11 WPUJC Vaas 1994-2009 111 162 35 3089 100* 24.32 1 13 12
## 12 RS Mahanama 1986-1998 52 89 1 2576 225 29.27 4 11 7
## 13 AP Gurusinha 1985-1996 41 70 7 2452 143 38.92 7 8 3
## 14 HAPW Jayawardene 2000-2015 58 83 11 2124 154* 29.50 4 5 9
## 15 RS Kaluwitharana 1992-2004 49 78 4 1933 132* 26.12 3 9 5
## 16 RP Arnold 1997-2004 44 69 4 1821 123 28.01 3 10 7
## 17 NT Paranavitana 2009-2012 32 60 5 1792 111 32.58 2 11 9
## 18 LD Chandimal 2011-2015 21 37 4 1455 162* 44.09 4 8 1
## 19 JK Silva 2011-2015 22 41 0 1355 139 33.04 2 9 3
## 20 LRD Mendis 1982-1988 24 43 1 1329 124 31.64 4 8 2
## 21 RL Dias 1982-1987 20 36 1 1285 109 36.71 3 8 2
## 22 UC Hathurusingha 1991-1999 26 44 1 1274 83 29.62 0 8 2
## 23 FDM Karunaratne 2012-2015 21 41 2 1271 152 32.58 2 6 4
## 24 M Muralitharan 1992-2010 132 162 56 1259 67 11.87 0 1 32
## 25 S Wettimuny 1982-1987 23 43 1 1221 190 29.07 2 6 5
## 26 MG Vandort 2001-2008 20 33 2 1144 140 36.90 4 4 3
## 27 WU Tharanga 2005-2015 21 38 1 1117 165 30.18 1 5 5
## 28 RS Madugalle 1982-1988 21 39 4 1029 103 29.40 1 7 4
## 29 HMRKB Herath 1999-2015 63 92 21 980 80* 13.80 0 1 16
## 30 HDRL Thirimanne 2011-2015 22 44 6 953 155* 25.07 1 4 6
## 31 HDPK Dharmasena 1993-2004 31 51 7 868 62* 19.72 0 3 4
## 32 SM Warnapura 2007-2009 14 24 1 821 120 35.69 2 7 5
## 33 JR Ratnayeke 1982-1989 22 38 6 807 93 25.21 0 5 5
## 34 UDU Chandana 1999-2005 16 24 1 616 92 26.78 0 2 0
## 35 MF Maharoof 2004-2011 22 34 4 556 72 18.53 0 3 1
## 36 GP Wickramasinghe 1991-2001 40 64 5 555 51 9.40 0 1 17
## 37 LPC Silva 2006-2008 11 17 1 537 152* 33.56 1 2 3
## 38 S Ranatunga 1994-1997 9 17 1 531 118 33.18 2 2 1
## 39 KTGD Prasad 2008-2015 23 36 1 455 47 13.00 0 0 8
## 40 RJ Ratnayake 1983-1992 23 36 6 433 56 14.43 0 2 5
## 41 CK Kapugedera 2006-2009 8 15 3 418 96 34.83 0 4 1
## 42 DS de Silva 1982-1984 12 22 3 406 61 21.36 0 2 3
## 43 KMDN Kulasekara 2005-2014 21 28 1 391 64 14.48 0 1 4
## 44 J Mubarak 2002-2015 13 23 1 385 49 17.50 0 0 5
## 45 SAR Silva 1983-1988 9 16 2 353 111 25.21 2 0 1
## 46 ALF de Mel 1982-1986 17 28 5 326 34 14.17 0 0 5
## 47 DSBP Kuruppu 1987-1991 4 7 1 320 201* 53.33 1 0 0
## 48 KDK Vithanage 2013-2015 8 12 2 301 103* 30.10 1 1 0
## 49 RS Kalpage 1993-1999 11 18 2 294 63 18.37 0 2 0
## 50 DNT Zoysa 1997-2004 30 40 6 288 28* 8.47 0 0 9