Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #8733 > unrolled thread
| Started by | maria giovanna dainotti <mariagiovannadainotti@yahoo.it> |
|---|---|
| First post | 2012-02-25 06:56 +0000 |
| Last post | 2012-02-27 11:40 +0000 |
| Articles | 3 — 3 participants |
Back to article view | Back to comp.soft-sys.math.mathematica
Importing data from the web maria giovanna dainotti <mariagiovannadainotti@yahoo.it> - 2012-02-25 06:56 +0000
Re: Importing data from the web Szabolcs <szhorvat@gmail.com> - 2012-02-27 11:42 +0000
Re: Importing data from the web Paperorbifold <kgodelNOSPAM@liberoNOSPAM.it> - 2012-02-27 11:40 +0000
| From | maria giovanna dainotti <mariagiovannadainotti@yahoo.it> |
|---|---|
| Date | 2012-02-25 06:56 +0000 |
| Subject | Importing data from the web |
| Message-ID | <jia0ne$1ar$1@smc.vnet.net> |
Dear Math Group,
I have a problem importing the data from a web page.
data4 = {{"050318", "00111529"}, {"050401", "00113120"}}
Do[
ID = data4[[i, 2]];
s = Import["http://www.swift.ac.uk/xrt_curves/<>ID<>", "Text"];
Print[s],
{i, 1, Length[data4]}]
The error message is
$Failed
I am really grateful if you could help me
Best regards,
Maria
[toc] | [next] | [standalone]
| From | Szabolcs <szhorvat@gmail.com> |
|---|---|
| Date | 2012-02-27 11:42 +0000 |
| Message-ID | <jifq7a$sn4$1@smc.vnet.net> |
| In reply to | #8733 |
On Saturday, 25 February 2012 08:56:46 UTC+2, maria giovanna dainotti wrote:
> Dear Math Group,
>
> I have a problem importing the data from a web page.
>
> data4 = {{"050318", "00111529"}, {"050401", "00113120"}}
> Do[
> ID = data4[[i, 2]];
> s = Import["http://www.swift.ac.uk/xrt_curves/<>ID<>", "Text"];
> Print[s],
> {i, 1, Length[data4]}]
>
> The error message is
> $Failed
>
> I am really grateful if you could help me
>
> Best regards,
> Maria
You have misplaced a quotation mark.
"http://www.swift.ac.uk/xrt_curves/<>ID<>"
should be
"http://www.swift.ac.uk/xrt_curves/"<>ID<>
[toc] | [prev] | [next] | [standalone]
| From | Paperorbifold <kgodelNOSPAM@liberoNOSPAM.it> |
|---|---|
| Date | 2012-02-27 11:40 +0000 |
| Message-ID | <jifq2g$skl$1@smc.vnet.net> |
| In reply to | #8733 |
maria giovanna dainotti wrote:
> s = Import["http://www.swift.ac.uk/xrt_curves/<>ID<>", "Text"];
^^^^^
You're not using the StringJoin operator (<>) in the right way.
Try to change the import URL in such a way:
Import["http://www.swift.ac.uk/xrt_curves/"<>ID, "Text"]
Cheers.
--
...and I will make them pay for what they've done! (J.L. Picard)
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web