I am trying to make a program to help scrape MMA stats from a website -
there is a table on this wiki page I am trying to grab info from
Code: Select all
InputBox, inputname, Fighter Name, Fighter Name, , 250, 100, 500, 500
Sleep, 25
siteprefix := "https://en.wikipedia.org/wiki/"
fightername := StrSplit(inputname, A_Space)
first := fightername[1]
last := fightername[2]
fightername := first "_" last
URL := siteprefix fightername
UrlDownloadToFile, %URL%, %A_Temp%\StatSRC.html
Sleep, 25
FileRead, statstring, %A_Temp%/StatSRC.html
Sleep, 25
statstring := RegExReplace(statstring, "\s+", A_Space)
foundvarko := RegExMatch(statstring, "yes2.>(\d+)", wikistat)
MsgBox, 0, , % wikistat1
MsgBox, 0, , % wikistat2
/*
MsgBox, 64, DFSBYTHENUMBERS,
(LTrim
%first% %last% has:
%wikistat1% Victories by KO
%wikistat2% Victories by Submission
%wikistat3% Victories by decision
%wikistat4% Victories by disqualifiation
)
*/
but I am sure it supposed to be %wikistat1% that should print the result
along with %wikistat2%, %wikistat3%, %wikistat4%
what am I doing wrong
![Question :?:](./images/smilies/icon_question.gif)
![Sad :(](./images/smilies/icon_e_sad.gif)