2016-05-10, 05:38
Also found a HUGE bug. If a user is trying to view a sponsor video and the video is a non-Roosterteeth video (i.e. it is AchievementHunter or FunHaus), the video will FAIL.
The reason it fails is because you hardcoded the login URL to 'http://roosterteeth.com/login' but you need to use the respective login page.
For example, if video_page_url is "http://roosterteeth.com/episode/ahwu-2016-316", you try to send the login POST request to http://roosterteeth.com/login but if you actually click http://roosterteeth.com/episode/ahwu-2016-316, it redirects to AH website which means you need to use http://achievementhunter.com/login as the login URL.
Message me and I will send you my code that condenses your code by about 400 lines and works for all videos (sponsored, RoosterTeeth, AH, FH, etc)
The reason it fails is because you hardcoded the login URL to 'http://roosterteeth.com/login' but you need to use the respective login page.
For example, if video_page_url is "http://roosterteeth.com/episode/ahwu-2016-316", you try to send the login POST request to http://roosterteeth.com/login but if you actually click http://roosterteeth.com/episode/ahwu-2016-316, it redirects to AH website which means you need to use http://achievementhunter.com/login as the login URL.
Message me and I will send you my code that condenses your code by about 400 lines and works for all videos (sponsored, RoosterTeeth, AH, FH, etc)