RE: scraping 04-11-2013, 01:11 PM
#3
that seems to be what im looking for thanks but i am having a few probs i installed the complete lobo package and download the cobra library and impoted it to ide i got some code that should work from another forum
the problem is UserAgentConteext still has redlines under and i dont have write package to fix this any ideas on what its looking for as cobras support aint great
thanks
the problem is
Code:
package cobtest;
import com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl;
import java.net.URL;
import org.omg.CORBA_2_3.portable.InputStream;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
public class Cobtest {
public static void main(String[] args) {
UserAgentContext uacontext = new SimpleUserAgentContext();
DocumentBuilderImpl builder = new DocumentBuilderImpl(rcontext);
URL url = new URL(TEST_URI);
InputStream in = url.openConnection().getInputStream();
try {
Document d = builder.parse(new InputSourceImpl(in, TEST_URI, "utf-8"));
} finally {
System.out.println("blah");
}
in.close();
Element ele = d.getElementById("name");
System.out.println(ele.getAttribute("value"));
}
}thanks
the problem is


![[+]](https://sinister.li/images/modern/collapse_collapsed.png)