Esempio n. 1
0
 private void GetNextPage(BusinessBLL.Models.SexSpider sexSpider, int page)
 {
     if (page > 1)
     {
         string link = sexSpider.SiteLink.Substring(0, sexSpider.SiteLink.LastIndexOf("/") + 1);
         sexSpider.SiteLink = link + sexSpider.ListPage.Replace("(*)", page.ToString());
     }
 }
Esempio n. 2
0
    private List <BusinessBLL.ViewModel.ListModel> GetLists(BusinessBLL.Models.SexSpider sexSpider, int page)
    {
        var lists = new List <BusinessBLL.ViewModel.ListModel>();

        try
        {
            GetNextPage(sexSpider, page);
            lists = BusinessBLL.SiteHelper.GetSiteList(sexSpider).ToList();
        }
        catch (Exception ex)
        {
            log.Error("列表错误", ex.Message);
        }

        return(lists);
    }
Esempio n. 3
0
    private List <BusinessBLL.ViewModel.ImageModel> GetImages(BusinessBLL.Models.SexSpider sexSpider, string url)
    {
        var lists = new List <BusinessBLL.ViewModel.ImageModel>();

        try
        {
            //PageLevel==0没有分页,==1有分页,==2只显示部分分页
            if (sexSpider.PageLevel == 0)
            {
                lists = BusinessBLL.SiteHelper.GetListImage(sexSpider, url).ToList();
            }
            else
            {
                lists = BusinessBLL.SiteHelper.GetListImagePage(sexSpider, url).ToList();
            }
        }
        catch (Exception ex)
        {
            log.Error("图片错误", ex.Message);
        }

        return(lists);
    }