Exemplo n.º 1
0
        public async Task DownloadFanArtAsync(string itemId)
        {
            string            cache  = CreateAndGetCacheName(itemId, "covers");
            string            url    = string.Format("{0}/{1}/{2}/{3}", BASE_URL, GET_PATH, itemId, COVER_PATH);
            MobyGamesCoverArt result = _downloader.Download <MobyGamesCoverArt>(url, cache);

            if (result == null)
            {
                return;
            }
            await DownloadCoverAsync(result.Front, itemId, COVERS_FRONT).ConfigureAwait(false);
            await DownloadCoverAsync(result.Back, itemId, COVERS_BACK).ConfigureAwait(false);
        }
Exemplo n.º 2
0
        // POST: api/Aptekas
        public async Task <IEnumerable <AptekaDrugInfo> > Post([FromBody] AptekasQuery query)
        {
            var html = await HtmlDownloader.Download("http://www.medgorodok.ru" + query.Url);

            var data = MedgorodokParser.Parse(html);

            return(data);
        }
Exemplo n.º 3
0
        public void ParseTest2()
        {
            var html = HtmlDownloader.Download("http://www.medgorodok.ru/drugs/aspirin-tabl-500-mg-n10-bajer-bitterfeld-gmbh-germaniya-drugs-21184.html");

            html.Wait();

            var result = MedgorodokParser.Parse(html.Result);
        }
Exemplo n.º 4
0
        protected void UpdateCores()
        {
            List <OnlineCore> onlineCores = new List <OnlineCore>();
            string            url         = _baseUrl + _latestUrl + ".index-extended";
            CoreList          coreList    = _downloader.Download <CoreList>(url);

            if (coreList != null)
            {
                onlineCores.AddRange(coreList.CoreUrls.OrderBy(c => c.Name));
            }

            CreateLocalCores(onlineCores);
        }