Package jc

Examples of jc.SoupProxy


    int nDelay = delayForUrl(sRemoteLink);

    f.sleepUnint(1000*nDelay);
    Document docLocal = null;
    try {
      SoupProxy proxy = new SoupProxy();
      docLocal = proxy.getDocumentFromFile(sLocalFile);
    }
    catch (JCException e) {
      throw new DownloadFailedException(e, m_ow, !m_bSilent);
    }
   
View Full Code Here


  public boolean verify(String sLink, boolean bSilent)
  {
    setLink(sLink);
    Document doc;
    try {
      SoupProxy proxy = new SoupProxy();
      doc = proxy.getDocument(m_sLink);
      m_doc = doc;
      m_remoteUrl = proxy.getUrl();
    }
    catch (JCException e) {
      m_ow.addLine(e.getMessage());
      return false;
    }
    if (!bSilent)
      println(PbnTools.m_res.getString("msg.documentLoaded"));

    if (!checkGenerator(doc, "KoPS2www, JFR 2005", bSilent))
      return false;
    if (getOneTag(doc, "frame[src=wyn.html]", bSilent) == null)
      return false;
    if (getOneTag(doc, "frame[src=roz.html]", bSilent) == null)
      return false;
    getTitleAndDir();

    // download 2 frames
    try {
      SoupProxy proxy = new SoupProxy();
      m_docWyn = proxy.getDocument(getBaseUrl(m_sLink) + "wyn.html");
      m_docRoz = proxy.getDocument(getBaseUrl(m_sLink) + "roz.html");
    }
    catch (JCException e) {
      m_ow.addLine(e.getMessage());
      return false;
    }
View Full Code Here

    m_bSilent = bSilent;
   
    resetErrors();
    Deal deal = new Deal();
    try {
      SoupProxy proxy = new SoupProxy();
      doc = proxy.getDocument(sUrl);
    }
    catch (JCException e) {
      throw new DownloadFailedException(e, m_ow, !m_bSilent);
    }
View Full Code Here

    asLinkRes.add(getBaseUrl(m_sLink) + sLastPart);
    asLinkRes.add(getBaseUrl(m_sLink) + sLastPart + ".html");
    asLinkRes.add(getBaseUrl(m_sLink)
                  + sLastPart.replace('?', '@') + ".html");
    asLinkRes.add("http://webutil.bridgebase.com/v2/" + sLastPart);
    SoupProxy proxy = new SoupProxy();
    for (String sLinkRes: asLinkRes) {
      if (f.isDebugMode()) m_ow.addLine("Trying to get better title from "
        + sLinkRes);
      try {
        m_docRes = proxy.getDocument(sLinkRes);
        Elements titles = m_docRes.select(".bbo_tlv");
        if (titles == null)
          throw new DownloadFailedException(
            PbnTools.getStr("error.tagNotFound", ".bbo_tlv"), m_ow, false);
        if (titles.size() < 2)
View Full Code Here

  {
    sLink = addOffset(sLink);
    setLink(sLink);
    Document doc;
    try {
      SoupProxy proxy = new SoupProxy();
      doc = proxy.getDocument(m_sLink);
      m_doc = doc;
      m_remoteUrl = proxy.getUrl();
    }
    catch (JCException e) {
      m_ow.addLine(e.toString());
      return false;
    }
View Full Code Here

  protected void downloadLins(String sLocalFile) //{{{
    throws DownloadFailedException
  {
    Document docLocal = null;
    try {
      SoupProxy proxy = new SoupProxy();
      docLocal = proxy.getDocumentFromFile(sLocalFile);
    }
    catch (JCException e) {
      throw new DownloadFailedException(e, m_ow, !m_bSilent);
    }
   
View Full Code Here

   
    if (PbnTools.getVerbos() > 0)
      m_ow.addLine(PbnTools.getStr("msg.processing", sUrl));
    resetErrors();
    try {
      SoupProxy proxy = new SoupProxy();
      doc = proxy.getDocument(sUrl);
      Elements nums = getElems(doc, "td.handnum", m_bSilent);
      for (Element num: nums) {
        Element tr = num.parent();
        Element aLin = getOneTagEx(tr, "a:matches(Lin)", m_bSilent);
        String sFile = SoupProxy.absUrl(aLin, "href");
View Full Code Here

    // download page with the first deal
    String sLink1 = getLinkForDeal(1);
    println(sLink1);
    Document doc1 = null;
    try {
      SoupProxy proxy = new SoupProxy();
      doc1 = proxy.getDocument(sLink1);
    }
    catch (JCException e) {
      throw new DownloadFailedException(e, m_ow, !bSilent);
    }
   
View Full Code Here

    */ //{{{
  protected boolean verifyDirect(boolean bSilent)
  {
    Document doc;
    try {
      SoupProxy proxy = new SoupProxy();
      doc = proxy.getDocument(m_sLink);
      m_doc = doc;
      m_remoteUrl = proxy.getUrl();
    }
    catch (JCException e) {
      m_ow.addLine(e.getMessage());
      return false;
    }
View Full Code Here

    m_bSilent = bSilent;
   
    resetErrors();
    Deal deal = new Deal();
    try {
      SoupProxy proxy = new SoupProxy();
      doc = proxy.getDocument(sUrl);
    }
    catch (JCException e) {
      throw new DownloadFailedException(e, m_ow, !m_bSilent);
    }
View Full Code Here

TOP

Related Classes of jc.SoupProxy

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.