Exemplo n.º 1
0
        public async Task CheckAll(Action <IManga> status)
        {
            var all      = _dbContext.GetMangasFrom(DbName);
            var openlink = _dbContext.GetOpenLinks();

            foreach (var manga in all)
            {
                status.Invoke(manga);
                var rss = await _webParser.GetRssFeedAsync(manga.Rss);

                if (rss == null)
                {
                    continue;
                }
                rss.Reverse();
                foreach (var rssItemObject in rss)
                {
                    var title = rssItemObject.Title;
                    var nc    =
                        Regex.Match(title, @"(?<other>ep\.|episode ) ?(?<chapter>\d+.?\d+|[0-9])",
                                    RegexOptions.IgnoreCase);
                    var ch = nc.Groups["chapter"].Value;
                    if (string.IsNullOrWhiteSpace(ch))
                    {
                        ch = rssItemObject.Title;
                    }
                    var isNew = _newChapterHelper.IsNew(manga, ch.Trim('.').Trim(), rssItemObject.PubDate,
                                                        rssItemObject.Link, openlink);
                }
            }
        }
Exemplo n.º 2
0
        public async Task CheckAll(Action <IManga> status)
        {
            var all = _dbContext.GetMangasFrom(DbName);
            var rss = await _webParser.GetRssFeedAsync("http://mangastream.com/rss");

            if (rss == null)
            {
                return;
            }
            rss.Reverse();
            var openlink = _dbContext.GetOpenLinks();

            foreach (var manga in all)
            {
                foreach (var rssItemObject in rss)
                {
                    status.Invoke(manga);
                    if (!rssItemObject.Title.ToLower().Contains(manga.Name.ToLower()))
                    {
                        continue;
                    }
                    var nc    = rssItemObject.Title.ToLower().Replace(manga.Name.ToLower(), string.Empty).Trim();
                    var isNew = _newChapterHelper.IsNew(manga, nc, rssItemObject.PubDate,
                                                        rssItemObject.Link, openlink);
                }
            }
        }
Exemplo n.º 3
0
        public async Task CheckAll(Action <IManga> status)
        {
            var all      = _dbContext.GetMangasFrom(DbName);
            var openlink = _dbContext.GetOpenLinks();

            foreach (var manga in all)
            {
                status.Invoke(manga);
                if (string.IsNullOrEmpty(manga.Rss))
                {
                    _logger.Log.Warn($"MANGAFOX {manga.Name} missing rss feed link");
                    continue;
                }
                var rss = await _webParser.GetRssFeedAsync(manga.Rss);

                if (rss == null)
                {
                    continue;
                }
                rss.Reverse();
                foreach (var rssItemObject in rss)
                {
                    // sample title => Boku no Hero Academia Vol TBD Ch 125
                    var re = Regex.Match(rssItemObject.Title,
                                         @"(?<name>.+)(?<vol>[vol tbd0-9]+)?[ch ]+?(?<chapter>[0-9\.]+)", RegexOptions.IgnoreCase);
                    var nc = string.IsNullOrEmpty(re.Groups["chapter"].Value)
                        ? rssItemObject.Title.Replace(manga.Name.ToLower(), string.Empty)
                        : re.Groups["chapter"].Value.Trim('.').Trim();
                    var isNew = _newChapterHelper.IsNew(manga, nc, rssItemObject.PubDate,
                                                        rssItemObject.Link, openlink);
                    await Task.Delay(100);
                }
            }
        }
Exemplo n.º 4
0
        public async Task CheckAll(Action <IManga> status)
        {
            var all      = _dbContext.GetMangasFrom(DbName);
            var openlink = _dbContext.GetOpenLinks();

            foreach (var manga in all)
            {
                status.Invoke(manga);
                var rss = await _webParser.GetRssFeedAsync(manga.Rss);

                if (rss == null)
                {
                    continue;
                }
                rss.Reverse();
                foreach (var rssItemObject in rss)
                {
                    var nc =
                        rssItemObject.Title.ToLower().Replace($"{manga.Name.ToLower()} chapter", string.Empty).Trim();
                    if (nc.Contains(" "))
                    {
                        nc = nc.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)[0];
                    }
                    var isNew = _newChapterHelper.IsNew(manga, nc, rssItemObject.PubDate,
                                                        rssItemObject.Link, openlink);
                }
            }
        }
Exemplo n.º 5
0
        public async Task CheckAll(Action <IManga> status)
        {
            // /en/0/87/5/ == 87.5
            // /en/0/24/ == 24
            var all      = _dbContext.GetMangasFrom(DbName);
            var openlink = _dbContext.GetOpenLinks();
            var rss      = await _webParser.GetRssFeedAsync("http://sensescans.com/reader/feeds/rss/");

            if (rss == null)
            {
                return;
            }
            rss.Reverse();
            foreach (var manga in all)
            {
                foreach (var rssItemObject in rss)
                {
                    status.Invoke(manga);
                    if (!rssItemObject.Title.ToLower().Contains(manga.Name.ToLower()))
                    {
                        continue;
                    }
                    var ncs = rssItemObject.Title.ToLower().Replace(manga.Name.ToLower(), string.Empty);
                    var nc  = Regex.Match(ncs.Trim(),
                                          @"(?<vol>vol\.\d+)? ?(?<chapter>(chapter)?[0-9\.]+)(.+)?:?(?<chaptername>.+)?",
                                          RegexOptions.IgnoreCase).Groups["chapter"].Value.Trim('.').Trim();
                    if (string.IsNullOrEmpty(nc))
                    {
                        nc = ncs;
                    }
                    var isNew = _newChapterHelper.IsNew(manga, nc, rssItemObject.PubDate,
                                                        rssItemObject.Link, openlink);
                }
            }
        }
Exemplo n.º 6
0
        public async Task CheckAll(Action <IManga> status)
        {
            // /en/0/87/5/ == 87.5
            // /en/0/24/ == 24
            var all      = _dbContext.GetMangasFrom(DbName);
            var openlink = _dbContext.GetOpenLinks();
            var rss      = await _webParser.GetRssFeedAsync("https://jaiminisbox.com/reader/feeds/rss");

            if (rss == null)
            {
                return;
            }
            rss.Reverse();
            foreach (var manga in all)
            {
                foreach (var rssItemObject in rss)
                {
                    status.Invoke(manga);
                    if (!rssItemObject.Title.ToLower().Contains(manga.Name.ToLower()))
                    {
                        continue;
                    }
                    var    ncs = rssItemObject.Link.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries);
                    string nc;
                    if (ncs[ncs.Length - 4] == "en")
                    {
                        nc = $"{ncs[ncs.Length - 2]}.{ncs[ncs.Length - 1]}";
                    }
                    else if (ncs[ncs.Length - 3] == "en")
                    {
                        nc = $"{ncs.Last()}";
                    }
                    else
                    {
                        continue;
                    }
                    var isNew = _newChapterHelper.IsNew(manga, nc, rssItemObject.PubDate,
                                                        rssItemObject.Link, openlink);
                }
            }
        }
Exemplo n.º 7
0
        //http://read.tomochan.today/rss
        public async Task CheckAll(Action <IManga> status)
        {
            var all = _dbContext.GetMangasFrom(DbName);
            var rss = await _webParser.GetRssFeedAsync("http://read.tomochan.today/rss");

            if (rss == null)
            {
                return;
            }
            rss.Reverse();
            var openlink = _dbContext.GetOpenLinks();

            foreach (var manga in all)
            {
                foreach (var rssItemObject in rss)
                {
                    status.Invoke(manga);
                    var isNew = _newChapterHelper.IsNew(manga, rssItemObject.Category, rssItemObject.PubDate,
                                                        rssItemObject.Link, openlink);
                    await Task.Delay(100);
                }
            }
        }
Exemplo n.º 8
0
        public async Task CheckAll(Action <IManga> status)
        {
            var all  = _dbContext.GetMangasFrom(DbName);
            var brss = _dbContext.GetSettingsFor("Batoto Rss");
            var rss  = await _webParser.GetRssFeedAsync(brss.Link);

            if (rss == null)
            {
                return;
            }
            rss.Reverse();
            var openlink = _dbContext.GetOpenLinks();

            foreach (var manga in all)
            {
                foreach (var rssItemObject in rss)
                {
                    // example title Jitsu wa Watashi wa - English - Vol.18 Ch.156: Aizawa Nagisa and Aizawa Nagisa②
                    status.Invoke(manga);
                    if (!rssItemObject.Title.ToLower().Contains(manga.Name.ToLower()))
                    {
                        continue;
                    }
                    var ncn = Regex.Match(rssItemObject.Title,
                                          @"(?<manga>.+) - .+ - ?([vol]+\.[0-9\.]+)? [ch\.]+?(?<chapter>[0-9\.]+)(\(.+\))?:?(?<chaptername>.+)",
                                          RegexOptions.IgnoreCase);
                    var ch = ncn.Groups["chapter"]?.Value.Trim() ?? ncn.Groups["chaptername"]?.Value.Trim();
                    if (string.IsNullOrEmpty(ch))
                    {
                        _logger.Log.Warn($"var ch={ch}, var Rss title={rssItemObject.Title}");
                        continue;
                    }
                    var isNew = _newChapterHelper.IsNew(manga, ch.Trim('.'), rssItemObject.PubDate,
                                                        rssItemObject.Link, openlink);
                }
            }
        }