How to capture information from another site that uses Ajax?? This site puts information 5 seconds after entering on the page. I'm using Server.XMLHTTP. And only can get the main page (full page) whitout the ajax inside a span . Is possible to create a delay to wait this 5 seconds and get information from this span ?? I'm using ASP, like this:
如何从使用Ajax的其他站点捕获信息?该网站在进入页面5秒后输入信息。我正在使用Server.XMLHTTP。并且只能在一个范围内获得主页(整页)以及ajax。是否可以创建延迟等待这5秒并从此跨度获取信息?我正在使用ASP,像这样:
url = "http://www.test.com"
objXMLHttp.Open "GET", Url, False
objXMLHttp.Send
strURL = BinaryToString(objXmlHttp.ResponseBody)
response.write strURL
You can enter: http://es.groupalia.com/descuentos-barcelona/escapada-esqui-forfait-sort.html and see the Source Code. See if you can get information inside the span id=texto_compradores
. I would like to get how many byers from a site (collective buying website). I can get this info from others sites that doesn't use ajax to refresh this info.
您可以输入:http://es.groupalia.com/descuentos-barcelona/escapada-esqui-forfait-sort.html并查看源代码。看看你是否可以在span id = texto_compradores中获取信息。我想从一个网站(集体购买网站)获得多少个粉丝。我可以从不使用ajax刷新此信息的其他网站获取此信息。
1 个解决方案
#1
1
If the total amount of coupons is the info you need, you'll have to do 2 calls, or deduce the ID info of the product before making the call:
如果优惠券的总金额是您需要的信息,您必须拨打2个电话,或在拨打电话之前推断产品的ID信息:
- You have to get the page as you're getting it right now
- 您必须立即获取该页面
-
Locate the product ID, the STORE and the URL from this line of the source code you get:
从您获得的源代码行找到产品ID,STORE和URL:
var data0 = {"product_id": "31031", "store": " barcelona_es", "url" : "/descuentos-barcelona/escapada-esqui-forfait-sort.html"};
var data0 = {“product_id”:“31031”,“store”:“barcelona_es”,“url”:“/ descuentos-barcelona / escapada-esqui-forfait-sort.html”};
-
Make a post call to: http://es.groupalia.com/live/descuentos-barcelona/ajax/getProductInfo/ with the parameters product ID, STORE and URL you got. You will get a bunch of numbers.
拨打电话:http://es.groupalia.com/live/descuentos-barcelona/ajax/getProductInfo/,其中包含您获得的参数产品ID,STORE和URL。你会得到一堆数字。
-
Each group of coupons will be separated with #. Iterate through the result by splitting by #, for each one you'll have to split by ;, the last item of this split array is the total coupon number
每组优惠券将用#分隔。通过拆分#迭代结果,对于每个你必须拆分的;,这个拆分数组的最后一项是总的优惠券号码
You cannot get the result of an AJAX call by calling directly from server and getting the page because this loads AFTER the page has loaded. So, you'll need make 2 calls.
您无法通过直接从服务器调用并获取页面来获取AJAX调用的结果,因为这会在页面加载后加载。所以,你需要打2个电话。
Use the javascript function procesa_resp(data) on the groupalia page to know how the pare that bunch of numbers you get from the page.
使用groupalia页面上的javascript函数procesa_resp(data)来了解从页面获得的那些数字的削减情况。
Hope it helps!!!
希望能帮助到你!!!
#1
1
If the total amount of coupons is the info you need, you'll have to do 2 calls, or deduce the ID info of the product before making the call:
如果优惠券的总金额是您需要的信息,您必须拨打2个电话,或在拨打电话之前推断产品的ID信息:
- You have to get the page as you're getting it right now
- 您必须立即获取该页面
-
Locate the product ID, the STORE and the URL from this line of the source code you get:
从您获得的源代码行找到产品ID,STORE和URL:
var data0 = {"product_id": "31031", "store": " barcelona_es", "url" : "/descuentos-barcelona/escapada-esqui-forfait-sort.html"};
var data0 = {“product_id”:“31031”,“store”:“barcelona_es”,“url”:“/ descuentos-barcelona / escapada-esqui-forfait-sort.html”};
-
Make a post call to: http://es.groupalia.com/live/descuentos-barcelona/ajax/getProductInfo/ with the parameters product ID, STORE and URL you got. You will get a bunch of numbers.
拨打电话:http://es.groupalia.com/live/descuentos-barcelona/ajax/getProductInfo/,其中包含您获得的参数产品ID,STORE和URL。你会得到一堆数字。
-
Each group of coupons will be separated with #. Iterate through the result by splitting by #, for each one you'll have to split by ;, the last item of this split array is the total coupon number
每组优惠券将用#分隔。通过拆分#迭代结果,对于每个你必须拆分的;,这个拆分数组的最后一项是总的优惠券号码
You cannot get the result of an AJAX call by calling directly from server and getting the page because this loads AFTER the page has loaded. So, you'll need make 2 calls.
您无法通过直接从服务器调用并获取页面来获取AJAX调用的结果,因为这会在页面加载后加载。所以,你需要打2个电话。
Use the javascript function procesa_resp(data) on the groupalia page to know how the pare that bunch of numbers you get from the page.
使用groupalia页面上的javascript函数procesa_resp(data)来了解从页面获得的那些数字的削减情况。
Hope it helps!!!
希望能帮助到你!!!