Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Use a "Group.Number" format. #2

Merged
merged 1 commit into from

2 participants

@dekz

Had issues importing to itunes and creating a playlist where there would be a number of "1 - abc" lectures. These would be indistinguishable from each other unless you knew which week the lecture name belonged to.

Change the format to be 'Group.number' so for example

./1 - Introduction (week 1)/1.1 - Course Overview.mp4
./1 - Introduction (week 1)/1.2 - What is cryptography?.mp4
@fvieira fvieira merged commit 1a4070f into from
@fvieira
Owner

You are right that that's important but since it's not important for everyone (at least it isn't for me) and for those that already used the script it would make the script redownload all files again since it changes the name of the files, I added it as an option that defaults to False.
This way you can still use the script for importing to itunes and no one get's bothered with the change of the file names. =D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 19, 2012
  1. @dekz

    Use a week.lecture format

    dekz authored
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  get_coursera_resources.py
View
2  get_coursera_resources.py
@@ -138,7 +138,7 @@ def main():
os.makedirs(section_folder)
lecture_names = lecture_list_el.xpath('./li/a/text()')
clean_lecture_names = [clean_lecture_name(lecture_name) for lecture_name in lecture_names]
- final_lecture_names = [os.path.join(section_folder, '{} - {}'.format(j, vn)) for j, vn in enumerate(clean_lecture_names, 1)]
+ final_lecture_names = [os.path.join(section_folder, '{}.{} - {}'.format(i, j, vn)) for j, vn in enumerate(clean_lecture_names, 1)]
url_list = lecture_list_el.xpath('./li/div[@class="item_resource"]/a/@href')
for j, url in enumerate(url_list):
resource_dict = RESOURCE_DICTS[j%4]
Something went wrong with that request. Please try again.