Reference: 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 year November 9 Morning 9:11:28 * Copyright (c), [email protected] All rights Reserved. **/ PackageCom.louis.youku;/*** classname:page * Function:todo ADD Function. * Reason:todo ADD Reason. * date:2017 Year November 9 Morning 9:11:28 *@authorMichael *@version * @sinceJDK 1.7 *@see */ Public classPage {//page Content PrivateString content; //Total play Volume PrivateString Allnumber; //Daily Play Increment PrivateString Daynumber; //Number of comments PrivateString Commentnumber; //Number of Favorites PrivateString Collectnumber; //likes PrivateString Supportnumber; //Tread PrivateString Againstnumber; //TV show Name PrivateString Tvname; //page URL PrivateString URL; //Subset Data PrivateString Episodenumber; PublicString getcontent () {returncontent; } Public voidsetcontent (String content) { This. Content =content; } PublicString Getallnumber () {returnAllnumber; } Public voidSetallnumber (String allnumber) { This. Allnumber =Allnumber; } PublicString Getdaynumber () {returnDaynumber; } Public voidSetdaynumber (String daynumber) { This. Daynumber =Daynumber; } PublicString Getcommentnumber () {returnCommentnumber; } Public voidSetcommentnumber (String commentnumber) { This. Commentnumber =Commentnumber; } PublicString Getcollectnumber () {returnCollectnumber; } Public voidSetcollectnumber (String collectnumber) { This. Collectnumber =Collectnumber; } PublicString Getsupportnumber () {returnSupportnumber; } Public voidSetsupportnumber (String supportnumber) { This. Supportnumber =Supportnumber; } PublicString Getagainstnumber () {returnAgainstnumber; } Public voidSetagainstnumber (String againstnumber) { This. Againstnumber =Againstnumber; } PublicString Gettvname () {returnTvname; } Public voidsettvname (String tvname) { This. Tvname =Tvname; } PublicString GetUrl () {returnURL; } Public voidseturl (String url) { This. url =URL; } PublicString Getepisodenumber () {returnEpisodenumber; } Public voidSetepisodenumber (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 November 9 9:14:16 * Copyright (c), [email protected] All rights Reserved. **/ PackageCom.louis.youku;/*** Classname:downloadservice * Function:todo ADD Function. * Reason:todo ADD Reason. * date:2017 Year November 9 Morning 9:14:16 *@authorMichael *@version * @sinceJDK 1.7 *@see */ Public InterfaceDownloadservice { PublicPage 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 November 9 9:14:16 * Copyright (c), [email protected] All rights Reserved. **/ PackageCom.louis.youku;/*** Classname:downloadservice * Function:todo ADD Function. * Reason:todo ADD Reason. * date:2017 Year November 9 Morning 9:14:16 *@authorMichael *@version * @sinceJDK 1.7 *@see */ Public InterfaceDownloadservice { PublicPage 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 year November 9 Morning 9:11:28 * Copyright (c), [email protected] All rights Reserved. **/ PackageCom.louis.youku;/*** classname:page * Function:todo ADD Function. * Reason:todo ADD Reason. * date:2017 Year November 9 Morning 9:11:28 *@authorMichael *@version * @sinceJDK 1.7 *@see */ Public classPage {//page Content PrivateString content; //Total play Volume PrivateString Allnumber; //Daily Play Increment PrivateString Daynumber; //Number of comments PrivateString Commentnumber; //Number of Favorites PrivateString Collectnumber; //likes PrivateString Supportnumber; //Tread PrivateString Againstnumber; //TV show Name PrivateString Tvname; //page URL PrivateString URL; //Subset Data PrivateString Episodenumber; PublicString getcontent () {returncontent; } Public voidsetcontent (String content) { This. Content =content; } PublicString Getallnumber () {returnAllnumber; } Public voidSetallnumber (String allnumber) { This. Allnumber =Allnumber; } PublicString Getdaynumber () {returnDaynumber; } Public voidSetdaynumber (String daynumber) { This. Daynumber =Daynumber; } PublicString Getcommentnumber () {returnCommentnumber; } Public voidSetcommentnumber (String commentnumber) { This. Commentnumber =Commentnumber; } PublicString Getcollectnumber () {returnCollectnumber; } Public voidSetcollectnumber (String collectnumber) { This. Collectnumber =Collectnumber; } PublicString Getsupportnumber () {returnSupportnumber; } Public voidSetsupportnumber (String supportnumber) { This. Supportnumber =Supportnumber; } PublicString Getagainstnumber () {returnAgainstnumber; } Public voidSetagainstnumber (String againstnumber) { This. Againstnumber =Againstnumber; } PublicString Gettvname () {returnTvname; } Public voidsettvname (String tvname) { This. Tvname =Tvname; } PublicString GetUrl () {returnURL; } Public voidseturl (String url) { This. url =URL; } PublicString Getepisodenumber () {returnEpisodenumber; } Public voidSetepisodenumber (String episodenumber) { This. Episodenumber =Episodenumber; } }
HttpClient crawling Youku