Skip to content
This repository has been archived by the owner on Nov 24, 2020. It is now read-only.

TypeError: 'NoneType' object is not subscriptable #1

Open
arajendr opened this issue Oct 19, 2017 · 1 comment
Open

TypeError: 'NoneType' object is not subscriptable #1

arajendr opened this issue Oct 19, 2017 · 1 comment

Comments

@arajendr
Copy link

Hi Josef Galea,

Greetings...

I'm trying to use your python script, I may need you help to fix the error i got during the execution.

Downloading course: https://cloudacademy.com/amazon-web-services/aws-sysops-administrator-course/
Traceback (most recent call last):
File "C:\Python34\Scripts\cloudacademy-dl-script.py", line 9, in load_entry_point('cloudacademy-dl==0.1.1', 'console_scripts', 'cloudacademy-dl')()
File "C:\Python34\lib\site-packages\cloudacademy\cloudacademy_dl.py", line 113, in main
download_course(course_url, username, password, video_res, output_dir)
File "C:\Python34\lib\site-packages\cloudacademy\cloudacademy_dl.py", line 93, in download_course
video_url = get_video_url(video_page_url, auth_cookies, video_res)
File "C:\Python34\lib\site-packages\cloudacademy\cloudacademy_dl.py", line 72, in get_video_url return source['src']
TypeError: 'NoneType' object is not subscriptable

Can you help me to fix this ?

Regards,
Ashok Rajendran.

@danieleplgr
Copy link

The problem I think happens due to the javascript layer that "adds" the html element on top of the page where previously the video-src was on the "plain" html code, so a simple http request with no js rendering engine previously works fine..

The solution for fixing the script I think it's not trivial.. the good news is that you can do it manually.. "view source html code" and search "data-res=" to finding the cloudfront-signed video src to download.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants