Some web pages do not explicitly contain the file extension "html" but is formatted that way (like this one). If I saved this page to my computer then Mathematica could parse it correctly. But if I just write Import[sdURL, "Data"], it returns weird stuff. How could I force mathematica to interpret the ".sd" page as HTML? Thanks!

  • 2
    $\begingroup$ Import["http://www.soccerbase.com/teams/transfers.sd?season_id=142&\ team_id=142&teamTabs=transfers", {"HTML", "Data"}] gets what you want, I think. $\endgroup$ Apr 20 '15 at 16:26
  • $\begingroup$ @bobthechemist Oh thanks! I was just digging through the help file and the manual to Import but did not find that usage $\endgroup$
    – arax
    Apr 20 '15 at 16:33

I suspect this is in the documentation, but just in case it is not obvious, one can indicate the import format as the first element of an array in the 2nd argument to Import:

Import["http://www.soccerbase.com/teams/transfers.sd?season_id=142& team_id=142&teamTabs=transfers", {"HTML", "Data"}]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.