我正在尝试使用azure函数上的WebClient解析网站。但是,我需要的数据是使用Ajax加载到网站上的。
使用Fiddler,我捕获了以下标头:
POST / api / mapa / getpropiedades HTTP / 1.1 主持人:www.toctoc.com 连接:保持活动状态 内容长度:741 接受:application / json,text / javascript, / ; q = 0.01 来源:https://www.toctoc.com X-XSRF令牌:6S-snzNXoQroxUCwWVle27J8eKj4ZpifM5v7sbl8gRNBx38hpPbAea18MSvV23dq1qI8bQl3sPhcu83F6WoJv5MqnmIMrWkZXhk_eyqSyK01 X-Requested-With:XMLHttpRequest 用户代理:Mozilla / 5.0(Windows NT 10.0; Win64; x64)AppleWebKit / 537.36(KHTML,如Gecko)Chrome / 69.0.3497.100 Safari / 537.36 内容类型:application / json 推荐人:https://www.toctoc.com/search/index2/?dormitorios=0&banos=0&superficieDesde=0&superficieHasta=0&precioDesde=0&precioHasta=0&moneda=UF&tipoArriendo=false&tipoVentaUsado=true&tipoVentaNuevo=false&tipoUltimasVentas=false&casaDepto=1&ordenarPorMoneda=UFCLP&ordenarDesc=false&ordernarPorFechaPublicacion=false&ordernarPorSuperficie=false&ordernarPorPrecio=false&pagina=1&textoBusqueda=Lo%20Barnechea&tipoVista=lista&viewport=-33.491362%2C-70.604719%2C-33.09646%2C-70.175886&comuna=Lo%20Barnechea®ion=&atributos=&idle=false&zoom=11&buscando=false&vuelveBuscar=false&dibujaPoligono=true&resetMapa=true&animacion=false&idZonaHomogenea=0&esPrimeraBusqueda=false 接受编码:gzip,deflate,br 接受语言:es-ES,es; q = 0.9,en-US; q = 0.8,en; q = 0.7 Cookie:optimizeEndUserId = oeu1537722587987r0.8385960195590116; OptimizelySegments =%7B%222204271535%22%3A%22gc%22%2C%222215970531%22%3A%22false%22%2C%222232940041%22%3A%22search%22%7D; optimizeBuckets =%7B%7D; NPS_93546e30_last_seen = 1537722590686; _ga = GA1.2.1771234782.1537722592; X-DATA = 3665c0e9-a16e-486f-813e-aafb84c47709; __RequestVerificationToken = 588DyjnPkT5cDcN6dfQL8yaGcm70mWVzFdvmP_sYgydlDcYAxXj2E_1ocebNPFkeYXJQjjBdJswxmeZ8m9SyyDgGoWLIRgAFz9bnx6uzivU1; _gid = GA1.2.389265767.1538525822; __insp_wid = 2107690165; __insp_nv = true; __insp_targlpu = aHR0cHM6Ly93d3cudG9jdG9jLmNvbS9TZWFyY2gvSW5kZXgvP3BhcmFtPXtEZWZhdWx0OmZhbHNlfXtlc3RhZG86TnVldmElMjBVc2FkYX17Y29tdW5hOkxhcyUyMENvbmRlc317cmVnaW9uOlJlZ2klQzMlQjNuJTIwTWV0cm9wb2xpdGFuYX17c3VwZXJmaWNpZUZEOm51bGx9e3ByZWNpb0ZIOm51bGx9e21vbmVkYTpudWxsfXtkb3JtaXRvcmlvc0ZEOm51bGx9e2Rvcm1pdG9yaW9zRkg6bnVsbH17YmFub3NGRDpudWxsfXtiYW5vc0ZIOm51bGx9e2xhdGl0dWQ6LTMzLjM5ODk4MTJ9e2xvbmdpdHVkOi03MC41NTczMTI0fXt2aWV3cG9ydDotMzMuNDgzMTk0OSwtNzAuNjA2ODE5OTk5OTk5OTcsLTMzLjM2MzUyNTQsLTcwLjQzMjM1NzA5OTk5OTk5fXtFc0J1c3F1ZWRhVGV4dG86dHJ1ZX17dHY6bX17ZWNuOnRydWV9e2VjdTp0cnVlfXtFc0J1c3F1ZWRhVmFsaWRhOnRydWV9e3RwOjB9e3RleHRvQnVzcXVlZGE6TGFzJTIwQ29uZGVzfQ%3D%3D; __insp_targlpt = QnVzY2FyIHkgY29tcHJhciBjYXNhIHBvciBtYXBhIGVuIFRvYyBUb2M%3D; __insp_norec_sess = true; X-DATA-NPSW = {“ CantidadVisitas”:1,“ FechaCreacion”:“ 2018-10-02T21:17:03.4269521-03:00”,“ FechaUltimoIngreso”:“ 2018-10-02T22:35:44.7510165-03: 00“,”详细信息“:[{” TipoVistaNPS“:2,” Cantidad“:10,” FechaUltimoIngreso“:”“ 2018-10-02T22:35:44.7510165-03:00”}]}}; optimizePendingLogEvents =%5B%5D; _gat = 1; mp_29ae90688062e4e2e6d80b475cef8685_mixpanel =%7B%22distinct_id%22%3A%20%221660768d31385-0fcc4f26979484-9393265-100200-1660768d314204%22%2C%22%24initial_referrer%22%3A %% 20%22%3.%F。 %22%2C%22%24initial_referring_domain%22%3A%20%22www.toctoc.com%22%2C%22%24search_engine%22%3A%20%22google%22%7D; __insp_slim = 1538530544522
和身体:
{“ dormitorios”:“ 0”,“ banos”:“ 0”,“ superficieDesde”:“ 0”,“ superficieHasta”:“ 0”,“ precioDesde”:“ 0”,“ precioHasta”:“ 0 “,” moneda“:” UF“,” tipoArriendo“:” false“,” tipoVentaUsado“:” true“,” tipoVentaNuevo“:” false“,” tipoUltimasVentas“:” false“,” casaDepto“:” 1“, “ ordenarPorMoneda”:“ UFCLP”,“ ordenarDesc”:“ false”,“ ordernarPorFechaPublicacion”:“ false”,“ ordernarPorSuperficie”:“ false”,“ ordernarPorPrecio”:“ false”,“ pagina”:“ 1”,“ textoBusqueda “:” Lo Barnechea“,” tipoVista“:” lista“,”视口“:”-33.491362,-70.604719,-33.09646,-70.175886“,” comuna“:” Lo Barnechea“,”区域“:”“,” atributos“:”“,” idle“:” false“,” zoom“:” 11“,” buscando“:” false“,” vuelveBuscar“:” false“,” dibujaPoligono“:” true“,” resetMapa“: “ true”,“ animacion”:“ false”,“ idZonaHomogenea”:“ 0”,“ esPrimeraBusqueda”:“ false”}
请,我需要帮助来捕获解析网站或直接调用API的数据。
感谢您的帮助!