{NeoBook Function}
Version=5,60
Language=NeoBook
Comment=Por josevdr95   (neo_html_parse2)|---------------------------------------------|Busca etiquetas en un html|---------------------------------------------|Parmetros:|htmlparse2.title|htmlparse2.head|htmlparse2.header|htmlparse2.body|htmlparse2.section|htmlparse2.footer|------------------------------------------------||
Param=[%url]|FileName|Direccin web (URL)
Param=[%WB]|FileName|Nombre del objeto Navegador Web
Param=[%Param2]|FileName|Parmetro (htmlparse.title)
{End}
If "[%Param2]" "=" "htmlparse2.title"
InternetGet "[%url]" "[tmp_code]" "Async"
StrLen "[tmp_code]" "[t_cadena]"
SearchStr "<title>" "[tmp_code]" "[P_1]" ""
Math "[t_cadena]-[P_1]" "-1" "[C_copiar1]"
SubStr "[tmp_code]" "[P_1]" "[C_copiar1]" "[tmp_code2]"
StrLen "[tmp_code2]" "[t_cadena2]"
SearchStr "</title>" "[tmp_code2]" "[P_2]" ""
StrDel "[tmp_code2]" "[P_2]" "[t_cadena2]" "[R_FINAL]"
Else
EndIf
.......
If "[%Param2]" "=" "htmlparse2.head"
InternetGet "[%url]" "[tmp_code]" "Async"
StrLen "[tmp_code]" "[t_cadena]"
SearchStr "<head>" "[tmp_code]" "[P_1]" ""
Math "[t_cadena]-[P_1]" "-1" "[C_copiar1]"
SubStr "[tmp_code]" "[P_1]" "[C_copiar1]" "[tmp_code2]"
StrLen "[tmp_code2]" "[t_cadena2]"
SearchStr "</head>" "[tmp_code2]" "[P_2]" ""
StrDel "[tmp_code2]" "[P_2]" "[t_cadena2]" "[R_FINAL]"
Else
EndIf
.........
If "[%Param2]" "=" "htmlparse2.header"
InternetGet "[%url]" "[tmp_code]" "Async"
StrLen "[tmp_code]" "[t_cadena]"
SearchStr "<header>" "[tmp_code]" "[P_1]" ""
Math "[t_cadena]-[P_1]" "-1" "[C_copiar1]"
SubStr "[tmp_code]" "[P_1]" "[C_copiar1]" "[tmp_code2]"
StrLen "[tmp_code2]" "[t_cadena2]"
SearchStr "</header>" "[tmp_code2]" "[P_2]" ""
StrDel "[tmp_code2]" "[P_2]" "[t_cadena2]" "[R_FINAL]"
Else
EndIf
.........
If "[%Param2]" "=" "htmlparse2.body"
InternetGet "[%url]" "[tmp_code]" "Async"
StrLen "[tmp_code]" "[t_cadena]"
SearchStr "<body>" "[tmp_code]" "[P_1]" ""
Math "[t_cadena]-[P_1]" "-1" "[C_copiar1]"
SubStr "[tmp_code]" "[P_1]" "[C_copiar1]" "[tmp_code2]"
StrLen "[tmp_code2]" "[t_cadena2]"
SearchStr "</body>" "[tmp_code2]" "[P_2]" ""
StrDel "[tmp_code2]" "[P_2]" "[t_cadena2]" "[R_FINAL]"
Else
EndIf
.........
If "[%Param2]" "=" "htmlparse2.section"
InternetGet "[%url]" "[tmp_code]" "Async"
StrLen "[tmp_code]" "[t_cadena]"
SearchStr "<section>" "[tmp_code]" "[P_1]" ""
Math "[t_cadena]-[P_1]" "-1" "[C_copiar1]"
SubStr "[tmp_code]" "[P_1]" "[C_copiar1]" "[tmp_code2]"
StrLen "[tmp_code2]" "[t_cadena2]"
SearchStr "</section>" "[tmp_code2]" "[P_2]" ""
StrDel "[tmp_code2]" "[P_2]" "[t_cadena2]" "[R_FINAL]"
Else
EndIf
.........
If "[%Param2]" "=" "htmlparse2.footer"
InternetGet "[%url]" "[tmp_code]" "Async"
StrLen "[tmp_code]" "[t_cadena]"
SearchStr "<footer>" "[tmp_code]" "[P_1]" ""
Math "[t_cadena]-[P_1]" "-1" "[C_copiar1]"
SubStr "[tmp_code]" "[P_1]" "[C_copiar1]" "[tmp_code2]"
StrLen "[tmp_code2]" "[t_cadena2]"
SearchStr "</footer>" "[tmp_code2]" "[P_2]" ""
StrDel "[tmp_code2]" "[P_2]" "[t_cadena2]" "[R_FINAL]"
Else
EndIf
..............
ClearVariables "[tmp_code]"
ClearVariables "[%E_I]"
ClearVariables "[P_1]"
ClearVariables "[t_cadena]"
ClearVariables "[C_copiar1]"
ClearVariables "[tmp_code2]"
ClearVariables "[t_cadena2]"
ClearVariables "[%E_F]"
ClearVariables "[P_2]"
BrowserLoadFromStr "[%WB]" "<html>|[R_FINAL]|</html>"
