C# Класс AmazonScrape.Scraper

Performs page and image loads and provides methods to encode/decode strings.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
CreateHttpRequest ( Uri URL ) : String

Given a URL, loads and returns a string representing a web page's markup

DecodeHTML ( string html ) : string

Decodes the HTML-encoded sections of the supplied string

DoEvents ( ) : void

Used to force the background worker to wait for a condition before proceeding.

DownloadWebImage ( Uri url ) : BitmapImage
EncodeURL ( string URL ) : string

Encodes the supplied string for use as a URL

LoadReviewHistogram ( string asin ) : string

Given a product's unique Amazon ID, loads the review distribution histogram. Much faster than an entire pageload for detailed review info.

LoadSearchPage ( int pageIndex, string searchTerms ) : string

Loads the result page based on the criteria and the supplied page index, determines the number of valid results on the page, and returns a list of strings representing the markup for each result on the page. Those results can be used by the other Scraper methods to obtain specific pieces of data (e.g. product name).

Описание методов

CreateHttpRequest() публичный статический Метод

Given a URL, loads and returns a string representing a web page's markup
public static CreateHttpRequest ( Uri URL ) : String
URL System.Uri
Результат String

DecodeHTML() публичный статический Метод

Decodes the HTML-encoded sections of the supplied string
public static DecodeHTML ( string html ) : string
html string HTML-encoded string
Результат string

DoEvents() публичный статический Метод

Used to force the background worker to wait for a condition before proceeding.
public static DoEvents ( ) : void
Результат void

DownloadWebImage() публичный статический Метод

public static DownloadWebImage ( Uri url ) : BitmapImage
url System.Uri
Результат System.Windows.Media.Imaging.BitmapImage

EncodeURL() публичный статический Метод

Encodes the supplied string for use as a URL
public static EncodeURL ( string URL ) : string
URL string string to encode
Результат string

LoadReviewHistogram() публичный статический Метод

Given a product's unique Amazon ID, loads the review distribution histogram. Much faster than an entire pageload for detailed review info.
public static LoadReviewHistogram ( string asin ) : string
asin string
Результат string

LoadSearchPage() публичный статический Метод

Loads the result page based on the criteria and the supplied page index, determines the number of valid results on the page, and returns a list of strings representing the markup for each result on the page. Those results can be used by the other Scraper methods to obtain specific pieces of data (e.g. product name).
public static LoadSearchPage ( int pageIndex, string searchTerms ) : string
pageIndex int
searchTerms string
Результат string