Exemple #1
0
        public void AmazonGetReview()
        {
            // Tolerable to have a made-up email when debugging.
            var sc = new AmazonWebClient("*****@*****.**");

            var body = sc.GetTestReview();

            //var review = sc.GetReview("Sandalwood-Patchouli-Different-Scents-Karma", "B06Y274RR8");
            if (body == null)
            {
                Console.WriteLine("Got null response from GetReviewPage.");
                return;
            }
            var results = sc.ParseReview(body);

            //var results = sc.GetReview("Eucalan-Lavender-Fine-Fabric-Ounce", "B001DEJMPG");

            Console.WriteLine(results.Item1);
            Console.WriteLine(results.Item2);
            var destFile = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "../../../../tmp", "searchResult.html");

            Console.WriteLine($"Writing {body.Length} characters to {AppDomain.CurrentDomain.BaseDirectory}");
            File.WriteAllText(destFile, body, Encoding.UTF8);

            Console.WriteLine("Finished.");
        }
Exemple #2
0
        public void AmazonSearch()
        {
            // Tolerable to have a made-up email when debugging.
            var sc = new AmazonWebClient("*****@*****.**");

            sc.Search("wallet");
        }
Exemple #3
0
        public void AmazonTestSearch()
        {
            // Tolerable to have a made-up email when debugging.
            var sc = new AmazonWebClient("*****@*****.**");

            var searchBody = sc.GetTestSearch();

            if (searchBody == null)
            {
                Console.WriteLine("Error when retrieving test search.");
                return;
            }
            var results = sc.ParseSearch(searchBody);
        }