Open Stunner opened 4 years ago
After debugging I have found several issues with the current raywenderlich.py
webpage
. <script>
//<![CDATA[
window.CAROLUS_ENV = {
KERCHING_BASE_URL: "https://store.raywenderlich.com/",
BETAMAX_BASE_URL: "https://videos.raywenderlich.com/api/v1",
GUARDPOST_BASE_URL: "https://accounts.raywenderlich.com/v2",
CONTENT_PERMISSIONS_REQUIRED_COOKIE_DOMAIN: ".raywenderlich.com",
USER_TOKEN: "*"
};
//]]>
</script>
GET /api/v1/videos/3712.json
Accept: application/json, text/javascript, */*; q=0.01
Authorization: Token $USER_TOKEN
Origin: https://www.raywenderlich.com
Referer: https://www.raywenderlich.com/
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.2 Safari/605.1.15
X-Requested-With: XMLHttpRequest
X-CSRF-Token: *
You can bypass by parse the USER_TOKEN with a parameter (--video-password) and get that value into raywenderlich.py
thumbnailUrl
in HTML's meta tags to get the lessonId. Apparently, there is no other way to get that 3712
except getting from the thumbnail. And there are videos that don't have a thumbnail.<meta property="og:image" content="https://files.betamax.raywenderlich.com/attachments/videos/3712/f0a9b08b-3919-4b5a-aad7-40676ce0fa1f.png">
Checklist
Verbose log
Description
This does require account credentials but I am unable to provide them as the account is a shared account and I am not the primary owner.