MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Problem importing HTML with Mathematica

  • To: mathgroup at smc.vnet.net
  • Subject: [mg96236] Re: Problem importing HTML with Mathematica
  • From: ragfield <ragfield at gmail.com>
  • Date: Tue, 10 Feb 2009 05:48:42 -0500 (EST)
  • References: <gmp0k6$brg$1@smc.vnet.net>

On Feb 9, 4:30 am, oil... at gmail.com wrote:
> Hi there,
>
> I had a Mathematica program that, among other things, had to import
> html code from a web site.
>
> Recently they made some changes in the web site and the program is not
> importing properly anymore. Instead of getting the source html code I
> would see with my internet browser I am just getting a simplified
> version of it (with no html syntax at all).
>
> I do not know what may have changed, but as a guess, it seems to me as
> if the web site realized that it is not a proper internet browser the
> one who is connecting and therefore it is sending back a simplified
> version of the page.
>
> As an example, you can just run:
> Import["http://www.atpworldtour.com/5/en/vault/draws.asp?TournamentID=
> \
> 352&TournamentYear=1993"]

Did you just upgrade your version of Mathematica?  Try adding an
explicit second argument to Import telling it which format you want.
For example, these all work:

Import["http://www.atpworldtour.com/5/en/vault/draws.asp?
TournamentID=352&TournamentYear=1993","Plaintext"]
Import["http://www.atpworldtour.com/5/en/vault/draws.asp?
TournamentID=352&TournamentYear=1993","Text"]
Import["http://www.atpworldtour.com/5/en/vault/draws.asp?
TournamentID=352&TournamentYear=1993","XMLObject"]

-Rob


  • Prev by Date: Re: most ChemicalData molecule plots missing?
  • Next by Date: Re: NMinimize Bug in Mathematica 7.0?
  • Previous by thread: Re: Problem importing HTML with Mathematica
  • Next by thread: Re: Problem importing HTML with Mathematica