Beispiel #1
0
        public static void DoScan(List <Category> categories, CookieContainer cc, int skip = 0)
        {
            bool isUpdate = false;

            if (categories.Count == 0)
            {
                categories = JavDataBaseManager.GetCategories();
            }
            else
            {
                isUpdate = true;
            }

            int currentCategory = 1;

            if (skip > 0)
            {
                categories = categories.Skip(skip - 1).ToList();
            }

            foreach (var category in categories)
            {
                cc = ScanHelper.ScanManager.Scan(category.Url, category.Name, currentCategory, categories.Count, cc, isUpdate);
                currentCategory++;
            }
        }
Beispiel #2
0
        public ActionResult ScanJav()
        {
            #region  页面
            List <ScanMap> page = new List <ScanMap>();

            page.Add(new ScanMap()
            {
                Title = "新话题",
                Url   = "http://www.javlibrary.com/cn/vl_update.php?mode="
            });

            page.Add(new ScanMap()
            {
                Title = "新加入",
                Url   = "http://www.javlibrary.com/cn/vl_newentries.php?mode="
            });
            page.Add(new ScanMap()
            {
                Title = "最想要",
                Url   = "http://www.javlibrary.com/cn/vl_mostwanted.php?mode="
            });
            page.Add(new ScanMap()
            {
                Title = "高评价",
                Url   = "http://www.javlibrary.com/cn/vl_bestrated.php?mode="
            });
            page.Add(new ScanMap()
            {
                Title = "新发行",
                Url   = "http://www.javlibrary.com/cn/vl_newrelease.php?mode="
            });

            ViewData.Add("page", page);
            #endregion

            #region  演员
            var actress = JavDataBaseManager.GetActress();
            ViewData.Add("actress", actress);
            #endregion

            #region  类型
            var cate = JavDataBaseManager.GetCategories();
            ViewData.Add("cate", cate);
            #endregion

            #region  收藏
            var faviModel = ScanDataBaseManager.GetFaviScan();

            var favi = faviModel.GroupBy(x => x.Category).ToDictionary(x => x.Key, x => x.ToList());

            ViewData.Add("favi", favi);
            #endregion

            return(View());
        }
 public static List <string> GetJavLibraryCategory()
 {
     return(JavDataBaseManager.GetCategories().Select(x => x.Name).ToList());
 }