Skip to content
This repository has been archived by the owner on Aug 1, 2021. It is now read-only.

Commit

Permalink
Updated code to dump html content of Article ..
Browse files Browse the repository at this point in the history
  • Loading branch information
r0oth3x49 committed Apr 26, 2018
1 parent cf4a0c8 commit 44ba483
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion udemy/_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
LOGOUT_URL = 'https://www.udemy.com/user/logout'

MY_COURSES_URL = 'https://www.udemy.com/api-2.0/users/me/subscribed-courses?fields[course]=id,title,published_title,headline,url,num_lectures,num_reviews,num_subscribers,created,enrollment_time,completion_ratio,avg_rating,locale&page=1&page_size=100'
COURSE_URL = 'https://www.udemy.com/api-2.0/courses/{course_id}/cached-subscriber-curriculum-items?fields[asset]=results,external_url,time_estimation,download_urls,slide_urls,filename,asset_type,captions,stream_urls&fields[chapter]=object_index,title,sort_order&fields[lecture]=id,title,object_index,asset,supplementary_assets,view_html&page_size=10000'
COURSE_URL = 'https://www.udemy.com/api-2.0/courses/{course_id}/cached-subscriber-curriculum-items?fields[asset]=results,external_url,time_estimation,download_urls,slide_urls,filename,asset_type,captions,stream_urls,body&fields[chapter]=object_index,title,sort_order&fields[lecture]=id,title,object_index,asset,supplementary_assets,view_html&page_size=10000'
HEADERS = {
'User-Agent' : 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.1 Safari/605.1.15',
'X-Requested-With' : 'XMLHttpRequest',
Expand Down
2 changes: 1 addition & 1 deletion udemy/_extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ def _real_extract(self, url=''):
'lecture_index' : lecture_index,
'lectures_id' : lecture_id,
'lecture_title' : lecture,
'html_content' : view_html,
'html_content' : asset.get('body'),
'extension' : 'html',
'assets' : retVal,
'assets_count' : len(retVal),
Expand Down

1 comment on commit 44ba483

@rhardja
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, I'm still getting this:

Getting course data: 2.44% [--------------------] [CRITICAL-428] Cannot download lecture "Introduction to Multivariate Analysis (MVA) Course": "u'view_html'"
Getting course data: 3.66% [=-------------------] [CRITICAL-428] Cannot download lecture "Materials for Section 1 Introduction to MV Data and Analysis": "u'view_html'"
Getting course data: 98.78% [====================] [CRITICAL-428] Cannot download lecture "SIMSEM Package Simulation Capabilities (part 1)": "u'view_html'"

Please sign in to comment.