[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.javascript

Can somebody give me a hint how I best solve this

Tony Johansson

6/9/2015 7:05:00 PM

I want to find the latest share price for given input for example ABB by
using this background data
(http://www.svt.se/svttext/web/page...)

This above ULR looks like this
203 SVT Text Tisdag 09 jun 2015
Källa: SIX 150609
LARGE CAP: AAK-BOL SLUTKURSER
+ - KÖP SÄLJ NAMN SENAST ANTAL

3.5 527.5 528 AAK 527.5 44325
0.6 189 189.1 ABB 189 2775531
0.5 156.5 156.6 ALFA 156.5 679018
20 1011 1013 ALIV 1011 181062
0.4 16.4 16.4 AOI 16.4 2112072
0.2 159.4 159.5 ASSAb 159.5 2013962
1.2 247.6 247.7 ATCOa 247.6 1891582
1.2 219.7 219.8 ATCOb 219.8 454934
5.95 6 ATCOil a 5.95 3464827
0.05 5.95 6 ATCOil b 6 4408940
1.9 128 128.2 AXFO 128.2 773621
7.3 330.3 336 AXIS 336 5082
11.5 543 543.5 AZN 543.5 433956
3.3 133.8 133.9 BALDb 133.9 307373
7.2 329.3 332.5 BALDpr 332.5 42392
2.9 123 123.1 BETSb 123.1 544835
0.5 136.3 136.4 BILL 136.4 709706
4.1 166.5 166.6 BOL 166.5 3073866

//Tony

4 Answers

ram

6/9/2015 7:17:00 PM

0

"Tony Johansson" <johansson.andersson@telia.com> writes:
>I want to find the latest share price for given input for example ABB by
>using this background data

search ["web scraping" "JavaScript"]

Ben Bacarisse

6/9/2015 7:33:00 PM

0

"Tony Johansson" <johansson.andersson@telia.com> writes:

> I want to find the latest share price for given input for example ABB
> by using this background data
> (http://www.svt.se/svttext/web/page...)
>
> This above ULR looks like this
> 203 SVT Text Tisdag 09 jun 2015
> Källa: SIX 150609
> LARGE CAP: AAK-BOL SLUTKURSER
> + - KÖP SÄLJ NAMN SENAST ANTAL
>
> 3.5 527.5 528 AAK 527.5 44325
> 0.6 189 189.1 ABB 189 2775531
> 0.5 156.5 156.6 ALFA 156.5 679018
> 20 1011 1013 ALIV 1011 181062
> 0.4 16.4 16.4 AOI 16.4 2112072
> 0.2 159.4 159.5 ASSAb 159.5 2013962
> 1.2 247.6 247.7 ATCOa 247.6 1891582
> 1.2 219.7 219.8 ATCOb 219.8 454934
> 5.95 6 ATCOil a 5.95 3464827
> 0.05 5.95 6 ATCOil b 6 4408940
> 1.9 128 128.2 AXFO 128.2 773621
> 7.3 330.3 336 AXIS 336 5082
> 11.5 543 543.5 AZN 543.5 433956
> 3.3 133.8 133.9 BALDb 133.9 307373
> 7.2 329.3 332.5 BALDpr 332.5 42392
> 2.9 123 123.1 BETSb 123.1 544835
> 0.5 136.3 136.4 BILL 136.4 709706
> 4.1 166.5 166.6 BOL 166.5 3073866

Client-side scripting may not be the best tool for this. I'd first try
using command-line tools. What constraints are you operating under?

--
Ben.

Scott Sauyet

6/10/2015 3:13:00 PM

0

Ben Bacarisse wrote:
> Tony Johansson writes:
>
>> I want to find the latest share price for given input for example ABB
>> by using this background data
>> [ ... ]
>> 3.5 527.5 528 AAK 527.5 44325
>> 0.6 189 189.1 ABB 189 2775531
>> 0.5 156.5 156.6 ALFA 156.5 679018
>
> Client-side scripting may not be the best tool for this. I'd first try
> using command-line tools. What constraints are you operating under?

But Javascript might well be used in your server-side toolset to solve
this problem.

The big question for the OP is, "So what?" You want to scrape the data? What have you tried? Is there something interesting for the group here to
work on? Or are you simply looking for us to do your work/homework?

-- Scott

Ben Bacarisse

6/10/2015 3:22:00 PM

0

Scott Sauyet <scott.sauyet@gmail.com> writes:

> Ben Bacarisse wrote:
>> Tony Johansson writes:
>>
>>> I want to find the latest share price for given input for example ABB
>>> by using this background data
>>> [ ... ]
>>> 3.5 527.5 528 AAK 527.5 44325
>>> 0.6 189 189.1 ABB 189 2775531
>>> 0.5 156.5 156.6 ALFA 156.5 679018
>>
>> Client-side scripting may not be the best tool for this. I'd first try
>> using command-line tools. What constraints are you operating under?
>
> But Javascript might well be used in your server-side toolset to solve
> this problem.

Yes, that was the wrong characterisation. In fact, the issue is not
client vs. server side, nor is is JS vs. any other scripting tool. It's
just, as you say:

> The big question for the OP is, "So what?" You want to scrape the
> data? What have you tried?

I'd use wget and perl (or awk) as a first go but we have no idea what is
available to the OP.

<snip>
--
Ben.