亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? htmlpage.java

?? 網(wǎng)絡機器人
?? JAVA
字號:
package com.heaton.bot;import java.util.*;import com.heaton.bot.*;import java.net.*;import java.io.*;import javax.swing.text.*;import javax.swing.text.html.*;/** * The HTMLPage class is used to parse an HTML page and store * that page, in a parsed form, in memory. * are exchanged with a webserver. * * Copyright 2001-2003 by Jeff Heaton (http://www.jeffheaotn.com) * * @author Jeff Heaton * @version 1.2 */public class HTMLPage {  /**   * A list of images on this page.   */  protected Vector images = new Vector();  /**   * A list of links on this page.   */  protected Vector links = new Vector();  /**   * A list of forms on this page.   */  protected Vector forms = new Vector();  /**   * The underlying HTTP object for this page.   */  protected HTTP http;  /**   * The base URL to resolve relative URL's.   */  protected String base;  /**   * Construct an HTMLPage object.   *   * @param http The HTTP object(or subclass) to use to   * download pages.   */  public HTMLPage(HTTP http)  {    this.http = http;  }  /**   * Called to open a page and read it in. If null   * is specified for the callback, then the other   * methods in this class may be used to look at   * images, links and forms.   *   * @param url The URL to read.   * @param callback A callback class to handle the parse, or null   * to use the built in one.   * @exception java.io.IOException   * @exception javax.swing.text.BadLocationException   */  public void open(String url,                   HTMLEditorKit.ParserCallback callback)  throws IOException,BadLocationException  {    http.send(url,null);   base = url;    processPage(callback);  }  /**   * Internal function called to start the parse.   *   * @param callback The callback object to use.   * @exception java.io.IOException   */  protected void processPage(HTMLEditorKit.ParserCallback callback)  throws IOException  {    StringReader r = new StringReader(http.getBody());    HTMLEditorKit.Parser parse = new HTMLParse().getParser();    if ( callback==null ) {      HTMLPage.Parser p=new HTMLPage.Parser();      parse.parse(r,p,true);    } else      parse.parse(r,callback,false);  }  /**   * Get the underlying HTTP object that was   * sent to the constructor.   *   * @return The underlying HTTP object.   */  public HTTP getHTTP()  {    return http;  }  /**   * Get a list of all of the links from this page.   * If this is to be used then null must have been   * passed as the callback object to the open method.   *   * @return All links on this page.   */  public Vector getLinks()  {    return links;  }  /**   * Get a list of all of the images from this page.   * If this is to be used then null must have been   * passed as the callback object to the open method.   *   * @return A list of all of the images on this page.   */  public Vector getImages()  {    return images;  }  /**   * Get a list of all of the forms from this page.   * If this is to be used then null must have been   * passed as the callback object to the open method.   *   * @return A list of forms.   */  public Vector getForms()  {    return forms;  }  /**   * Called to perform a post for the specified form.   *   * @param form The form object to post.   * @exception java.io.IOException   */  public void post(HTMLForm form)  throws IOException  {    http.getClientHeaders().set("Content-Type",                                 "application/x-www-form-urlencoded");    http.send(form.getAction(),form.toString());    processPage(null);  }  /**   * Get the URL that is represented by this page.   *   * @return The URL that is represented by this page.   */  public String getURL()  {    return http.getURL();  }  /**   * Called internally to add an image to the list.   *   * @param img The image to add.   */  protected void addImage(String img)  {    img = URLUtility.resolveBase(base,img);    for ( int i=0;i<images.size();i++ ) {      String s = (String)images.elementAt(i);      if ( s.equalsIgnoreCase(img) )        return;    }    images.addElement(img);  }  /**   * A HTML parser callback used by this class to   * detect links, images and forms.   *   * @author Jeff Heaton   * @version 1.0   */  protected class Parser    extends HTMLEditorKit.ParserCallback {    /**     * Used to build up data for an HTML form.     */    protected HTMLForm tempForm;    /**     * Used to build up options for an HTML form.     */    protected AttributeList tempOptions;    /**     * Used to build up options for an HTML form.     */    protected Attribute tempElement = new Attribute();    /**     * Holds the prompt text(just before or after a control.     */    protected String tempPrompt = "";    /**     * Holds the link till the end link is found     */    protected Link tempLink;    /**     * Called to handle comments.     *     * @param data The comment.     * @param pos The position.     */    public void handleComment(char[] data,int pos)    {    }    /**     * Called to handle an ending tag.     *     * @param t The ending tag.     * @param pos The position.     */    public void handleEndTag(HTML.Tag t,int pos)    {      if ( t==HTML.Tag.OPTION ) {        if ( tempElement!=null ) {          tempElement.setName(tempPrompt);          tempOptions.add(tempElement);          tempPrompt = "";        }        tempElement = null;      } else if ( t==HTML.Tag.FORM ) {        if ( tempForm!=null )          forms.addElement(tempForm);        tempPrompt = "";      } else if ( t==HTML.Tag.A ) {        if ( tempLink!=null )          tempLink.setPrompt(tempPrompt);        tempPrompt = "";      }    }    /**     * Called to handle an error. Not used.     *     * @param errorMsg The error.     * @param pos The position.     */    public void handleError(String errorMsg,int pos)    {    }    /**     * Called to handle a simple tag.     *     * @param t The simple tag.     * @param a The attribute list.     * @param pos The position.     */    public void handleSimpleTag(HTML.Tag t,                                MutableAttributeSet a,int pos)    {      handleStartTag(t,a,pos);    }    /**     * Called to handle a starting tag.     *     * @param t The starting tag.     * @param a The attribute list.     * @param pos The position.     */    public void handleStartTag(HTML.Tag t,                               MutableAttributeSet a,int pos)    {      String type = "";      // is it some sort of a link      String href = (String)a.getAttribute(HTML.Attribute.HREF);      if ( (href!=null) && (t!=HTML.Tag.BASE) ) {        String alt = (String)a.getAttribute(HTML.Attribute.ALT);        Link link = new Link(                            alt,                            URLUtility.resolveBase(base,href),                            null);        links.addElement(tempLink=link);      } else if ( t==HTML.Tag.OPTION ) {        tempElement = new Attribute();        tempElement.setName("");        tempElement.setValue((String)a.getAttribute(HTML.Attribute.VALUE));      } else if ( t==HTML.Tag.SELECT ) {        if ( tempForm==null )          return;        tempOptions = new AttributeList();        tempForm.addInput(                          (String)a.getAttribute(HTML.Attribute.NAME),                          null,                          "select",                          tempPrompt,                          tempOptions);        tempPrompt = "";      } else if ( t==HTML.Tag.TEXTAREA ) {        if ( tempForm==null )          return;        tempForm.addInput(                          (String)a.getAttribute(HTML.Attribute.NAME),                          null,                          "textarea",                          tempPrompt,                          null);        tempPrompt = "";      }      else if ( t==HTML.Tag.FORM ) {        if ( tempForm!=null )          forms.addElement(tempForm);        String action =        (String)a.getAttribute(HTML.Attribute.ACTION);        if ( action!=null ) {          try {            URL aurl = new URL(new URL(http.getURL()),action);            action = aurl.toString();          } catch ( MalformedURLException e ) {            action = null;          }        }        tempForm = new HTMLForm(                                (String)a.getAttribute(HTML.Attribute.METHOD),                                action );        tempPrompt = "";      } else if ( t==HTML.Tag.INPUT ) {        if ( tempForm==null )          return;        if ( t!=HTML.Tag.INPUT ) {          type = (String)a.getAttribute(HTML.Attribute.TYPE);          if ( type==null )            return;        } else          type = "select";        if ( type.equalsIgnoreCase("text") ||             type.equalsIgnoreCase("edit") ||             type.equalsIgnoreCase("password") ||             type.equalsIgnoreCase("select") ||             type.equalsIgnoreCase("hidden") ) {          tempForm.addInput(                            (String)a.getAttribute(HTML.Attribute.NAME),                            (String)a.getAttribute(HTML.Attribute.VALUE),                            type,                            tempPrompt,                            null);          tempOptions = new AttributeList();        }      } else if ( t==HTML.Tag.BASE ) {        href = (String)a.getAttribute(HTML.Attribute.HREF);        if ( href!=null )          base = href;      } else if ( t==HTML.Tag.IMG ) {        String src = (String)a.getAttribute(HTML.Attribute.SRC);        if ( src!=null )          addImage(src);      }    }    /**     * Called to handle text.     *     * @param data The text.     * @param pos The position.     */    public void handleText(char[] data,int pos)    {      tempPrompt += new String(data) + " ";    }  }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩欧美电影一二三| 中文字幕一区视频| 欧美本精品男人aⅴ天堂| 欧美一级专区免费大片| 欧美大尺度电影在线| 精品福利av导航| 国产欧美日韩另类视频免费观看| 9191成人精品久久| 亚洲精品一线二线三线| 日韩欧美精品在线视频| 精品99999| 中文字幕在线一区二区三区| 18成人在线观看| 樱桃国产成人精品视频| 香蕉加勒比综合久久| 亚洲福利视频一区二区| 狠狠色丁香久久婷婷综合丁香| 国v精品久久久网| 欧美色成人综合| 欧美高清一级片在线| 久久影院视频免费| 精品福利一区二区三区免费视频| 久久综合视频网| 亚洲精品国产第一综合99久久| 免费在线观看不卡| 成人免费毛片片v| 欧美一区二区三区免费在线看| 最新久久zyz资源站| 日韩成人精品在线观看| 91丨九色丨蝌蚪丨老版| 精品三级在线看| 亚洲人成在线播放网站岛国| 午夜影视日本亚洲欧洲精品| 成人a级免费电影| 久久亚洲捆绑美女| 日本欧美一区二区在线观看| 日本丶国产丶欧美色综合| 国产精品天美传媒| 国产不卡高清在线观看视频| 91麻豆精品国产自产在线观看一区 | 国产成人av一区二区| 欧美成人bangbros| 日韩成人一级大片| 7777精品伊人久久久大香线蕉超级流畅| 国产精品久久久久久久岛一牛影视| 日韩高清中文字幕一区| 欧美图区在线视频| 国产精品成人免费在线| 国产成人啪午夜精品网站男同| 精品人在线二区三区| 五月天婷婷综合| 日韩欧美一级特黄在线播放| 一区二区三区四区不卡视频| 成人高清在线视频| 亚洲男人的天堂av| 欧美日韩激情一区二区三区| 日韩成人免费电影| 26uuu亚洲综合色欧美| 国产精品一级片在线观看| 中文字幕乱码亚洲精品一区| 成人免费观看av| 最新成人av在线| 精品视频1区2区| 麻豆中文一区二区| 久久这里只有精品首页| 91看片淫黄大片一级在线观看| 亚洲电影一级片| 久久伊人中文字幕| 成人久久久精品乱码一区二区三区| 国产女同互慰高潮91漫画| av在线不卡观看免费观看| 亚洲福利视频一区| 久久日韩粉嫩一区二区三区| 91久久国产最好的精华液| 韩国一区二区视频| 日韩av一区二区三区| 亚洲夂夂婷婷色拍ww47| 亚洲精品中文字幕在线观看| 欧美国产日韩亚洲一区| 久久久精品免费网站| 日韩欧美一级二级| 在线播放中文一区| 欧美在线小视频| 欧美曰成人黄网| 92国产精品观看| a亚洲天堂av| 成人免费毛片嘿嘿连载视频| 国产一区二区在线观看视频| 亚洲成人精品一区| 亚洲同性同志一二三专区| 久久精品人人做| 欧美精品一区二区久久久| 在线观看中文字幕不卡| 风间由美性色一区二区三区| 成人午夜免费电影| 国产在线乱码一区二区三区| 日本在线不卡一区| 麻豆国产一区二区| 精品一区二区在线看| 麻豆一区二区三| 国产一区二区精品久久| 国内偷窥港台综合视频在线播放| 日本在线不卡视频| 久久99热这里只有精品| 久久国产尿小便嘘嘘| 九一久久久久久| 国产suv精品一区二区6| 成人精品小蝌蚪| av电影在线不卡| 91理论电影在线观看| 在线视频一区二区三区| 91极品视觉盛宴| 欧美一卡二卡在线观看| 日韩精品中文字幕一区| 久久美女高清视频| 最好看的中文字幕久久| 午夜免费久久看| 国产一区二区成人久久免费影院| 国产成人免费9x9x人网站视频| 99re这里只有精品视频首页| 欧美日韩中文精品| 精品粉嫩超白一线天av| 国产精品的网站| 日韩二区在线观看| 成人免费黄色在线| 91精品国产综合久久久久久漫画 | 欧美国产日韩精品免费观看| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆 | 在线观看欧美黄色| 91麻豆精品国产无毒不卡在线观看| 久久久久久9999| 日韩高清一区在线| 国产精品一线二线三线精华| 99久久国产综合精品女不卡| 日韩一区二区在线播放| 日韩伦理电影网| 国产成人综合在线观看| 欧美精品自拍偷拍动漫精品| 日韩限制级电影在线观看| 亚洲卡通动漫在线| 国产精品羞羞答答xxdd| 欧美一级在线观看| 亚洲综合图片区| 99久久久国产精品| 国产欧美日产一区| 国产精品白丝av| 精品国产一区二区在线观看| 一区二区国产视频| 韩国精品在线观看| 欧美一区二区三区视频免费| 亚洲丶国产丶欧美一区二区三区| 91美女福利视频| 亚洲欧美日韩小说| 粉嫩欧美一区二区三区高清影视| 精品国产免费人成电影在线观看四季| 亚洲女厕所小便bbb| www.激情成人| 伊人性伊人情综合网| 国产精品 欧美精品| 国产婷婷一区二区| 精品一二三四区| 国产日韩影视精品| 丁香婷婷综合色啪| 亚洲精品乱码久久久久久久久| 日本丰满少妇一区二区三区| 亚洲一区二区三区在线看| 日韩一卡二卡三卡| av中文字幕一区| 日本不卡在线视频| 精品国产免费久久| 91小视频免费看| 蜜臀av国产精品久久久久| 中文字幕中文在线不卡住| 制服丝袜国产精品| 99re视频精品| 精品一区二区三区视频在线观看| 国产精品丝袜91| 日韩一区二区在线看| 色综合中文字幕国产| 热久久久久久久| 亚洲久本草在线中文字幕| 久久亚洲一区二区三区四区| 欧美体内she精高潮| 成人免费毛片app| 国产一区二区三区四| 性做久久久久久免费观看 | 亚洲成在线观看| 欧美极品xxx| 精品国产sm最大网站| 欧美一级一区二区| 99精品黄色片免费大全| 激情六月婷婷综合| 亚洲高清久久久| 中文字幕佐山爱一区二区免费| 精品第一国产综合精品aⅴ| 欧美日韩一本到| 欧亚洲嫩模精品一区三区| 99精品欧美一区二区三区综合在线| 青青草精品视频| 老色鬼精品视频在线观看播放|