コード例 #1
0
ファイル: KatWorker.cs プロジェクト: dmzoneill/filebotpp
        private void parse_page_torrents( string page )
        {
            foreach ( Match match in Regex.Matches( page, "<tr.*?>(.*?)</tr>", RegexOptions.IgnoreCase | RegexOptions.Singleline ) )
            {
                var epname = Regex.Match( match.Groups[ 1 ].Value, "<a href=\".*?\" class=\"cellMainLink\">(.*?)</a>" );
                var epmagnet = Regex.Match( match.Groups[ 1 ].Value, "\"(magnet:.*?)\"" );

                if ( !epmagnet.Success || !epname.Success )
                {
                    continue;
                }

                var torrent = new Torrent {Epname = epname.Groups[ 1 ].Value.Trim(), Magnetlink = epmagnet.Groups[ 1 ].Value.Trim(), Series = this._seriesname, Imbdid = this._imdbid};
                this._torrents.Add( torrent );
                //Console.WriteLine( "    " + torrent.Imbdid + " - " + torrent.Epname + " - " + torrent.Magnetlink );
            }
        }
コード例 #2
0
ファイル: EztvWorker.cs プロジェクト: dmzoneill/filebotpp
        private void parse_episodes()
        {
            Factory.Instance.LogLines.Enqueue( @"Parsing " + this._series + @" metadata..." );

            foreach ( Match match in Regex.Matches( this._html, "<tr.*?>(.*?)</tr>", RegexOptions.IgnoreCase | RegexOptions.Singleline ) )
            {
                var epname = Regex.Match( match.Groups[ 1 ].Value, @"class=.epinfo.>(.*?)<\/a>" );
                var epmagnet = Regex.Match( match.Groups[ 1 ].Value, "\"(magnet:.*?)\"" );

                if ( !epmagnet.Success || !epname.Success )
                {
                    continue;
                }

                var torrent = new Torrent {Epname = epname.Groups[ 1 ].Value.Trim(), Magnetlink = epmagnet.Groups[ 1 ].Value.Trim(), Series = this._series, Imbdid = this._imdbid};
                this._torrents.Add( torrent );
            }

            this._html = null;
        }