Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #8758
| From | "Hans Michel" <hmichel@cox.net> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: Importing data from the web |
| Date | 2012-02-26 09:23 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <jictm3$enf$1@smc.vnet.net> (permalink) |
| References | <201202250655.BAA01311@smc.vnet.net> |
Maria:
Try
data4 = {{"050318", "00111529"}, {"050401", "00113120"}};
Do[
ID = data4[[i, 2]];
url = "http://www.swift.ac.uk/xrt_curves/" <> ID ;
s = Import[url, "Text"];
Print[s],
{i, 1, Length[data4]}
]
The string join you were attempting did not work. I moved the concatenation
of the url string external to the Import this way if you wish to test if the
url exist before import you can. Somewhere on MathGroup there is code to
test for existence of a URL.
Hans
-----Original Message-----
From: maria giovanna dainotti [mailto:mariagiovannadainotti@yahoo.it]
Sent: Saturday, February 25, 2012 12:55 AM
Subject: Importing data from the web
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
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: Importing data from the web "Hans Michel" <hmichel@cox.net> - 2012-02-26 09:23 +0000
csiph-web