The first step is to identify URL to the data source. Inspecting the source code of the website, we find that the website consists of two iframes. The URL to leftmost iframe is
http://dr.ittf.com/ittf_ranking/team_ranking1.asp?FormName=Search&
FormAction=search&Gender=M&Month1=6&Year1=2017&Category=sen
This is the URL to the table. The next step is to identify the parameters from the URL so that we can easily build the URL corresponding to the table which we want to scrape:
url[gender_, month_, year_] := URLBuild[
"http://dr.ittf.com/ittf_ranking/team_ranking1.asp", {
"FormName" -> "Search",
"FormAction" -> "search",
"Gender" -> gender,
"Month1" -> month,
"Year1" -> year,
"Category" -> "sen"
}]
url["M", 6, 2017]
(* Out: "http://dr.ittf.com/ittf_ranking/team_ranking1.asp?FormName=Search&\
FormAction=search&Gender=M&Month1=6&Year1=2017&Category=sen" *)
Now we need to import the HTML into Mathematica and extract the information. This is traditionally done by importing the HTML as XML, and then using Cases
to find the information. There are plenty of examples of that already in other questions. I will use my package, jsoupLink, to do the parsing. With jsoupLink it would look like this:
Needs["jsoupLink`"]
html = Import[url["M", 6, 2017], "HTMLDOM"];
rows = html["Select", "tr"][[7 ;;]];
columns = #["AllText"] & /@ #["Select", "td"][[{2, 4, 5}]] & /@ rows;
columns[[;; 10]] // TableForm
