Jump to content
3rdWorld

Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. If you already have an account, login here - otherwise create an account for free today!

Sign in to follow this  
sunjester

Getting Hulu Capture Data for your Hulu Checker

Recommended Posts

0LFlmem.png

So now, let's see how we can add capture to checkers with regex and with some other libraries. The way I like to do it is with regular expressions since it almost never needs an external library attached to the project. But Hulu makes its pretty easy with their API endpoints and JSON responses

Hulu
So we want to "capture" data about the account after we know a valid account. The page to capture hulu info is on https://secure.hulu.com/account. Below is a screenshot from a basic Hulu account, this is what we will be capturing.

AVMXmRg.png

With Hulu you need to grab the CSRF token before you can login and grab the right cookies. Hulu will send a request from the login page to https://secure.hulu.com/api/3.0/generate_csrf_value?for_hoth=true&path=/v2/web/password/authenticate to grab a CSRF token. If you grab your cookies from the browser you will be able to use those to grab a csrf. Here is my curl request:

curl --header "Host: secure.hulu.com" --header "Upgrade-Insecure-Requests: 1" --header "User-Agent: Mozilla/5.0 (X11; CrOS x86_64 11647.104.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.88 Safari/537.36" --header "Referer: https://secure.hulu.com/account" --header "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3" -v --cookie-jar newcookie 'https://secure.hulu.com/api/3.0/generate_csrf_value?for_hoth=true&path=/v2/web/password/authenticate'

And here is the response, with the CSRF token

V5GwlLi.png

Our cookies will be saved in the cookiejar, we can use this file (newcookie) to use the CSRF token.

Hulu API Json
There is an easier way to get Hulu account info, that's by using their API. You can check subscriptions using the following endpoint:
which will return something like...

{"alert":null,"lastChargeDate":"04/01/19","hasBillingHistory":true,"monthlyDue":{"basePlan":{"items":[{"name":"Hulu","price":{"amount":"$5.99","frequency":"/mo","duration":null},"message":null,"items":null}],"link":{"linkText":"Manage","href":"/account/addons"},"message":null,"id":1},"addOns":{"items":[{"name":"None Added"}],"link":{"linkText":"Manage","href":"/account/addons#addons-section"},"message":null},"recurringTotal":{"name":"Monthly Recurring Total","price":{"amount":"$5.99","frequency":"/mo","duration":null}}},"nextCharge":{"nextChargeDate":"05/01/19","nextChargeAmount":{"amount":"$6.36","frequency":null,"duration":null},"items":[{"name":"Hulu","price":{"amount":"$5.99","frequency":null,"duration":null},"message":"05/01 - 06/01","items":null},{"name":"Tax","price":{"amount":"$0.37","frequency":null,"duration":null},"items":null}],"hasTax":true},"cancelLink":null,"canPauseSubscription":true,"canCancelSubscription":true,"canRetryCharge":false,"isFullVip":false,"isLimitedVip":false,"isTimeLimitedVip":false}

As you can see, all the account subscription info is in there. You will need to authenticate yourself using the method above, then send the request with the correct cookie jar to the API endpoint. Other endpoints include...

  • Like 1

Share this post


Link to post
Share on other sites

wow thanks to there api and how it gives everything i could easily make this into a c# or python checker 

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...