开发者

Get HTML JavaScript tag with cURL

I'm trying to get some information filtered from this kind of page (http://www.ricardo.ch/kaufen/computer-und-netzwerk/apple/ipad/apple-ipad-16gb-3gwifi-neu-case-komplettes-zubehoer/v/an637769334/). I'd really like to get the end time label filtered out but if I get the HTML with cURL this label is not there. I'm sure there is a开发者_如何学运维 Javascript that write this value on load time but I can't find it. Can someone help me?


Yes, the time is being fetched via a javascript ajax GET request to this url:

http://www.ricardo.ch/DataService/Proxy.aspx?GetInfosTimeLeft?AuctionNr=637769334&CountryNr=2

The above url returns a javascript array of the CreationDate, Duration, EndDate, LastClosedDate, StartDate and TimeLeft. You could get the contents of the url via cURL and parse the results.

Replace the AuctionNr var with the auction item number you are trying to get.

However doing this isn't really that ethical, and could break at any time if Ricardo decide to change the way they do things.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜