2

I cannot get time remaining from groupon HTML. I did find a method before by hitting the link and it returned in JSON format, but that link no longer works.

So is there any way to get the time remaining from the deals? Only for goods, getaways, and all deals.I can get from the now deals(that is just text) unlike others which is a countdown counter.

To be on same page lets start with this link:

http://www.groupon.com/deals/3rd-coast-cruising-1?c=all&p=23

And before I used to hit:

http://www.groupon.com/deals/3rd-coast-cruising-1/deal_status.json

And got information including the remaining time, but it's not doing so any longer.

confusedMind
  • 2,573
  • 7
  • 33
  • 74

1 Answers1

1

It's still there, in the form of a timestamp. Using the source of the first link:

<li class='groupon_countdown' data-deadline='1337576399' ...

And in the second link:

"deadline":"1337576399"

I don't know what language you're using, but with python you can convert this to a readable format like this:

>>>import time
>>>time.asctime(time.localtime(1337576399))
'Mon May 21 06:59:59 2012'

Which corresponds with now + the time left on their timer, in my timezone anyway.

Junuxx
  • 14,011
  • 5
  • 41
  • 71
  • i am using c# not sure how to make that into time :| , thank you for the note i will try to convert into time now.. :) lets c – confusedMind May 20 '12 at 02:09
  • See [this question](http://stackoverflow.com/questions/2883576/how-do-you-convert-epoch-time-in-c) for that :) – Junuxx May 20 '12 at 02:13