AmazonScrape.Scraper.LoadSearchPage C# (CSharp) Method

LoadSearchPage() public static method

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
return string
        public static string LoadSearchPage(int pageIndex, string searchTerms)
        {
            if (searchTerms == null) return "";

            // Encode characters that are not URL-friendly
            // example: "C#" should become "C%23"
            searchTerms = EncodeURL(searchTerms);

            string URL = Constants.SEARCH_URL + searchTerms + Constants.SEARCH_URL_PAGE_PARAM + pageIndex.ToString();

            return CreateHttpRequest(new Uri(URL));
        }