• Httpclient爬取优酷网


     参考:http://www.cnblogs.com/lchzls/p/6277210.html

    /httpClient/src/main/java/com/louis/youku/Page.java

    /**
     * Project Name:httpClient
     * File Name:Page.java
     * Package Name:com.louis.youku
     * Date:2017年11月9日上午9:11:28
     * Copyright (c) 2017, 2692613726@qq.com All Rights Reserved.
     *
    */
    
    package com.louis.youku;
    /**
     * ClassName:Page 
     * Function: TODO ADD FUNCTION. 
     * Reason:     TODO ADD REASON. 
     * Date:     2017年11月9日 上午9:11:28 
     * @author   michael
     * @version  
     * @since    JDK 1.7
     * @see      
     */
    public class Page {
        //页面内容
        private String content;
        
        //总播放量
        private String allnumber;
        
        //每日播放增量
        private String daynumber;
        
        //评论数
        private String commentnumber;
    
        //收藏数
        private String collectnumber;
    
        //
        private String supportnumber;
    
        //
        private String againstnumber;
    
        //电视剧名称
        private String tvname;
    
        //页面url
        private String url;
    
        //子集数据
        private String episodenumber;
    
        public String getContent() {
            return content;
        }
    
        public void setContent(String content) {
            this.content = content;
        }
    
        public String getAllnumber() {
            return allnumber;
        }
    
        public void setAllnumber(String allnumber) {
            this.allnumber = allnumber;
        }
    
        public String getDaynumber() {
            return daynumber;
        }
    
        public void setDaynumber(String daynumber) {
            this.daynumber = daynumber;
        }
    
        public String getCommentnumber() {
            return commentnumber;
        }
    
        public void setCommentnumber(String commentnumber) {
            this.commentnumber = commentnumber;
        }
    
        public String getCollectnumber() {
            return collectnumber;
        }
    
        public void setCollectnumber(String collectnumber) {
            this.collectnumber = collectnumber;
        }
    
        public String getSupportnumber() {
            return supportnumber;
        }
    
        public void setSupportnumber(String supportnumber) {
            this.supportnumber = supportnumber;
        }
    
        public String getAgainstnumber() {
            return againstnumber;
        }
    
        public void setAgainstnumber(String againstnumber) {
            this.againstnumber = againstnumber;
        }
    
        public String getTvname() {
            return tvname;
        }
    
        public void setTvname(String tvname) {
            this.tvname = tvname;
        }
    
        public String getUrl() {
            return url;
        }
    
        public void setUrl(String url) {
            this.url = url;
        }
    
        public String getEpisodenumber() {
            return episodenumber;
        }
    
        public void setEpisodenumber(String episodenumber) {
            this.episodenumber = episodenumber;
        }
        
    }

    /httpClient/src/main/java/com/louis/youku/DownLoadService.java

    /**
     * Project Name:httpClient
     * File Name:DownLoadService.java
     * Package Name:com.louis.youku
     * Date:2017年11月9日上午9:14:16
     * Copyright (c) 2017, 2692613726@qq.com All Rights Reserved.
     *
    */
    
    package com.louis.youku;
    /**
     * ClassName:DownLoadService 
     * Function: TODO ADD FUNCTION. 
     * Reason:     TODO ADD REASON. 
     * Date:     2017年11月9日 上午9:14:16 
     * @author   michael
     * @version  
     * @since    JDK 1.7
     * @see      
     */
    public interface DownLoadService {
        public Page downLoad(String url);
    }

    /httpClient/src/main/java/com/louis/youku/DownLoadServiceImpl.java

    /**
     * Project Name:httpClient
     * File Name:DownLoadService.java
     * Package Name:com.louis.youku
     * Date:2017年11月9日上午9:14:16
     * Copyright (c) 2017, 2692613726@qq.com All Rights Reserved.
     *
    */
    
    package com.louis.youku;
    /**
     * ClassName:DownLoadService 
     * Function: TODO ADD FUNCTION. 
     * Reason:     TODO ADD REASON. 
     * Date:     2017年11月9日 上午9:14:16 
     * @author   michael
     * @version  
     * @since    JDK 1.7
     * @see      
     */
    public interface DownLoadService {
        public Page downLoad(String url);
    }

    /httpClient/src/main/java/com/louis/youku/PageDownLoadUtil.java

    /**
     * Project Name:httpClient
     * File Name:Page.java
     * Package Name:com.louis.youku
     * Date:2017年11月9日上午9:11:28
     * Copyright (c) 2017, 2692613726@qq.com All Rights Reserved.
     *
    */
    
    package com.louis.youku;
    /**
     * ClassName:Page 
     * Function: TODO ADD FUNCTION. 
     * Reason:     TODO ADD REASON. 
     * Date:     2017年11月9日 上午9:11:28 
     * @author   michael
     * @version  
     * @since    JDK 1.7
     * @see      
     */
    public class Page {
        //页面内容
        private String content;
        
        //总播放量
        private String allnumber;
        
        //每日播放增量
        private String daynumber;
        
        //评论数
        private String commentnumber;
    
        //收藏数
        private String collectnumber;
    
        //
        private String supportnumber;
    
        //
        private String againstnumber;
    
        //电视剧名称
        private String tvname;
    
        //页面url
        private String url;
    
        //子集数据
        private String episodenumber;
    
        public String getContent() {
            return content;
        }
    
        public void setContent(String content) {
            this.content = content;
        }
    
        public String getAllnumber() {
            return allnumber;
        }
    
        public void setAllnumber(String allnumber) {
            this.allnumber = allnumber;
        }
    
        public String getDaynumber() {
            return daynumber;
        }
    
        public void setDaynumber(String daynumber) {
            this.daynumber = daynumber;
        }
    
        public String getCommentnumber() {
            return commentnumber;
        }
    
        public void setCommentnumber(String commentnumber) {
            this.commentnumber = commentnumber;
        }
    
        public String getCollectnumber() {
            return collectnumber;
        }
    
        public void setCollectnumber(String collectnumber) {
            this.collectnumber = collectnumber;
        }
    
        public String getSupportnumber() {
            return supportnumber;
        }
    
        public void setSupportnumber(String supportnumber) {
            this.supportnumber = supportnumber;
        }
    
        public String getAgainstnumber() {
            return againstnumber;
        }
    
        public void setAgainstnumber(String againstnumber) {
            this.againstnumber = againstnumber;
        }
    
        public String getTvname() {
            return tvname;
        }
    
        public void setTvname(String tvname) {
            this.tvname = tvname;
        }
    
        public String getUrl() {
            return url;
        }
    
        public void setUrl(String url) {
            this.url = url;
        }
    
        public String getEpisodenumber() {
            return episodenumber;
        }
    
        public void setEpisodenumber(String episodenumber) {
            this.episodenumber = episodenumber;
        }
        
    }
  • 相关阅读:
    8.5 exit函数进程控制
    8.2 进程标识
    8.6 wait和waitpid函数进程控制
    2.jpg
    8.3 fork函数进程控制
    8.4 vfork函数进程控制
    8.9 竞态条件
    8.8 wait3和wait4函数进程控制
    8.7 waitid函数进程控制
    Silverlight Tools 3.0中文正式版发布(附下载地址)
  • 原文地址:https://www.cnblogs.com/Michael2397/p/7807810.html
Copyright © 2020-2023  润新知