Click here to Skip to main content
15,905,590 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want fetch reviews from the following site using webrequest.The content is coming but no reviews are showing.What is the problem?
C#
public static string FetchWebpageSourceContent()
        {
            try
             {
         string _path ="http://www.walmart.com/catalog/allReviews.do?product_id=6457603";             
var req = HttpWebRequest.Create(_path);
                var response = req.GetResponse();

                return new System.IO.StreamReader(response.GetResponseStream()).ReadToEnd();
            }
            catch (Exception ex)
            {
                return String.Empty;
            }
        }
Posted

1 solution

The reviews are coming by some client side script so in response string you are getting some un-compiled Jquery-js content.

the below jquery function is fetching the reviews

$BV.ui("rr", "show_reviews", {
productId: " 6457603",
contentContainerDiv: "BVReviewsContainer",
summaryContainerDiv: "BVCustomerRatings",
secondarySummaryContainerDiv: "BVSecondaryCustomerRatings",
mediaGalleryContainerDiv: "BVMediaGalleryContainer",
sort: "helpfulness",
dir: "desc"
});


So you are not able to see the review comments.

Hope this helps !!!

Regards,
Reishabh
 
Share this answer
 
v2
Comments
Tirthankar Dutta 21-Jul-12 8:10am    
Thanks for your replies..any can you suggest me any suggestion to fetch the reviews in any way?
Reishabh_Saxena 21-Jul-12 8:32am    
Try to do html scrapping by HTML browser control.

http://www.codeproject.com/Articles/50544/Using-the-WebBrowser-Control-in-ASP-NET

Regards,
Reishabh

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900