c# - Using selectors with csQuery -
i new csquery , having difficult time getting off ground. following simple asp.net controller. returning following: $('.ng-scope').eq(0).find($('.ng-binding')).html(). classes referenced exist. doing right?
public class homecontroller : controller { viewmodel vm = new viewmodel(); public actionresult index() { var url = "http://www.weather.com/weather/5day/l/08817:4:us"; var web = new webclient(); web.headers[httprequestheader.useragent] = "hello"; //in case require var html = web.downloadstring(url); cq dom = html; var x = dom["$('.ng-scope').eq(0).find($('.ng-binding')).html()"]; vm.day = x.render(); return view(vm); } }
so, first thing selector in jquery syntax, , needs adapted csquery, like: dom[".ng-scope"].eq(0).find(".ng-binding").html();
second put url in browser , looked @ source. there not single element class of "ng-scope"
. think need analyze source of page downloading can reformulate query.
Comments
Post a Comment