Jump to content
UBot Underground

Weird Foreign Characters Http Plugin Xpath Parser


Recommended Posts

Guys, I would like to transform XML feed into csv file, but I run into trouble of weird characters while getting data from XML, it is all nonsense, and I have no I idea how to go around it:

 

Code:

 

set(#xml$plugin function("HTTP post.dll""$http get""http://www.hrnce-obchod.sk/192fc044e74dffea144f9ac5dc9f3395/heureka_sk_export.xml""""""", 30), "Global")
set(#DESCRIPTION$plugin function("HTTP post.dll""$xpath parser"#xml"//DESCRIPTION""InnerText""XML"), "Global")
load html(#DESCRIPTION)

 

Basicaly, it will navigate to:

 

http://www.hrnce-obchod.sk/192fc044e74dffea144f9ac5dc9f3395/heureka_sk_export.xml

 

xpath parser will get "DESCRIPTION"

 

And the result is absolute mess.

 

Any help will be appreciated. THX.

Link to post
Share on other sites

Ubot doesn't play nicely with certain encodings. Especially if you try to display them in their browser.

 

Put this above your code:

plugin command("HTTP post.dll", "http set encoding", "UTF8")

Then run it and look in the debugger, not the browser output. You will see it reads much better and should be able to save it no problem from there.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...