Asp. The realization of gatherinfo of net Universal acquisition program

Source: Internet
Author: User

This is my interview topic, borrowed a lot of online colleagues code, if offended, please Haihan!

Now the work is really difficult to find, I apply for the unit is http://www.027dns.net/, I hope the company manager can give me the opportunity to work, I will work very hard, because the software industry is my world! I was a college undergraduate as security guards have become colleagues jokes, hehe.

This is my first job search software industry, the first time to do the interview topic, the first time so seriously write blog articles, bad writing, please correct me, I will progress!

Zhang Sufung, reprint please indicate the source http://www.cnblogs.com/zhangsufeng/archive/2009/02/28/1400224.html

Say less, the text begins:

If we collect the Web site: http://info.laser.hc360.com/list/z_news_yw.shtml on the news, request to collect the title, time, content, a single article if the page is collected completely.

This type of collection is to get the news list (i.e. URL) from the specified Web page, then get the news details through its URL, this is a very common collection method, it is possible to collect on many pages, so we can use the interface to construct the base class.

First define IGatherInfo.cs

1using System;

2using System.Collections.Generic;

3using System.Linq;

4using System.Text;

5

6namespace classlibrary

7{

8/**////<summary>

9///News Collection class interface

///</summary& gt;

Interface Igatherinfo

/**////<summary>

14///Collection Time

15/// </summary>

string gathertime

{get

;

Set;

/**////<summary>

///Newslisturl: Extract page address

///regexstring: Regular table Tatsu-style, extract logic

24///Return to News page URL

///</summary> 

list<string> Gatherurll IST (String Newslisturl, String regexstring);

27//Collect News details

list<newsdetail> gathernewsdetail (list<string> newsurllist, 

string Re gexstring);

31}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.