I'm having trouble with importing HTML from XOWA offline wikipedia database. I set up a local server for datamining, but I can't access it with Mathematica. I can request a HTML page with curl
or wget
, but Mathematica's Import[]
crashes the XOWA server with
failed to process request;
request=<<NULL>>
err_msg=[err 0] <gplx> invalid content_type: line=Content-Type: application/x-www-form-urlencoded request=type: GET url: /en.wikipedia.org/wiki/Test protocol: HTTP/1.1 host: localhost:8080 user_agent: Wolfram HTTPClient 10.2 accept: */* accept_encoding: <<NULL>> dnt: false x_requested_with: <<NULL>> cookie: <<NULL>> referer: <<NULL>> content_length: 0 content_type: <<NULL>> content_type_boundary: <<NULL>> connection: <<NULL>> pragma: <<NULL>> cache_control: <<NULL>>
[trace]:
gplx.core.net.Http_request_parser.Parse_content_type(Unknown Source)
gplx.core.net.Http_request_parser.Parse(Unknown Source)
gplx.xowa.servers.http.Http_server_wkr_v2.Run(Unknown Source)
gplx.xowa.servers.http.Http_server_wkr_v2.Invk(Unknown Source)
gplx.core.threads.Thread_adp.run(Unknown Source)
java.lang.Thread.run(Thread.java:745)
I'm using ImportString[Import["!curl \"http://localhost:8080/en.wikipedia.org/wiki/"<>link<>"\"","Text"],"XMLObject"]
at the moment but I'm interested in fixing the problem with direct importing. Unfortunately I don't understand the Java errors so I can't debug this myself.