Package jc

Examples of jc.SoupProxy$CacheElement


  {
    // We should read lin file directly, but SoupProxy has a cache
    // so it would be more network efficient to use it.
    m_doc = null;
    try {
      SoupProxy proxy = new SoupProxy();
      m_doc = proxy.getDocument(sUrl);
    }
    catch (JCException e) {
      m_sp.addLine(e.getMessage());
      return false;
    }
View Full Code Here


    * an url of pbntools web page, in Polish.
    * @return <code>null</code> on error. */ 
  public static String getVersionFromUrl(String sUrl)
                throws jc.SoupProxy.Exception
  {
    SoupProxy sp = new SoupProxy();
    Document doc = sp.getDocument(sUrl);
    Pattern pat = Pattern.compile("Aktualna wersja. ([0-9\\.]+)[,:].*");
    for (Element e : doc.body().getElementsMatchingOwnText("Aktualna wersja")) {
      Matcher m = pat.matcher(e.text());
      if (m.matches()) {
        return m.group(1);
View Full Code Here

  LinReader dr = new LinReader();
  dr.setOutputWindow(new StandardSimplePrinter());
 
  File tourneyHtmlFile = new File(sDirIn)
    .listFiles(new FileFilterNameMask(".*tourney.*.html"))[0];
  SoupProxy proxy = new SoupProxy();
  Document mainDoc = proxy.getDocument(tourneyHtmlFile.toString());
  Elements ele = mainDoc.select("a:contains(Board)");
  for (Element e: ele) {
    File travFile = new File(f.decodeUrlRes(SoupProxy.absUrl(e, "href")));
    Document travDoc = proxy.getDocument(travFile.toString());
    Elements ele2 = travDoc.select("a:matches(Lin)");
    for (Element e2: ele2) {
      String sLinFile = SoupProxy.absUrl(e2, "href");
      assert(dr.verify(sLinFile, !f.isDebugMode()));
      Deal[] deals = dr.readDeals(sLinFile, false); // bSilent
View Full Code Here

TOP

Related Classes of jc.SoupProxy$CacheElement

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.