Get Value From site

Post Reply
suaiiaus
Posts: 4
Joined: Tue Oct 15, 2019 5:47 pm

Get Value From site

Post by suaiiaus » Sat Nov 09, 2019 7:08 am

hi salvador
please help me how do get value from this site and save to excel file??

http://www.tsetmc.com/Loader.aspx?ParTree=151311&i=46741025610365786

or this site

http://www.tsetmc.com/Loader.aspx?ParTree=15131F


tanks

User avatar
salvadordf
Posts: 1950
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Get Value From site

Post by salvadordf » Sat Nov 09, 2019 7:46 am

Hi,

To get any text from a web page you need to visit the DOM and find it.

There are 2 ways to do that :
  • Use a customized version of the DOMVisitor demo to find what you need and send it to the browser process with a process message.
  • Use a customized version of the JSEXtension or JSRTTIExtension demos to register a JavaScript extension. Execute a custom JavaScript code to find what you need and call your extension with the result to send it to the browser process with a process message.
Read the code comments in those demos to know more details, specially the comments in the JSEXtension demo.

Once you have the data it's easy to create a CSV file. If I remember correctly, it's just a text file with your values separated by TABs.

suaiiaus
Posts: 4
Joined: Tue Oct 15, 2019 5:47 pm

Re: Get Value From site

Post by suaiiaus » Sat Nov 09, 2019 8:56 am

tanks for reply

I'm not good at programming if you can explain more

tanks

suaiiaus
Posts: 4
Joined: Tue Oct 15, 2019 5:47 pm

Re: Get Value From site

Post by suaiiaus » Mon Nov 11, 2019 6:22 am

hi salvador

If possible write me a code or help
I will be grateful
Getting value the partial information that the arrow shows

tanks
You do not have the required permissions to view the files attached to this post.

User avatar
salvadordf
Posts: 1950
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Get Value From site

Post by salvadordf » Mon Nov 11, 2019 11:13 am

suaiiaus wrote:
Mon Nov 11, 2019 6:22 am
If possible write me a code or help
I will be grateful
Getting value the partial information that the arrow shows
I'm sorry but I'm very busy and I can't create your application.
Please, be more specific about what things need a more detailed explanation.

suaiiaus
Posts: 4
Joined: Tue Oct 15, 2019 5:47 pm

Re: Get Value From site

Post by suaiiaus » Mon Nov 11, 2019 11:47 am

Only get value from this site

http://www.tsetmc.com/Loader.aspx?ParTree=151311&i=46741025610365786

only java script code need for JSExtension demo

tanks

qaplok
Posts: 5
Joined: Sat Nov 10, 2018 9:37 pm

Re: Get Value From site

Post by qaplok » Thu Nov 21, 2019 3:09 am

Hi. First step you must find in how frame you value is. To find names of frames use:

Code: Select all

list := TStringList.Create;
  Chromium1.GetFrameNames(list);
Use RetreieveHTML to get HTML code of frame with name from list - you must catch it in Chromium1TextResultAvailable in "aText" value.
Find needed value in google chrome with press ctr-shift-i. I hope no need to explain how get value at table html code ;)
I added timer to my programm with interval 100 and get HTML code 10 time in minute - it more than enough to respond to the slightest price changes in the forex.

Post Reply