Skip to content

patch for pgm course pdfs #3

@sivaramn

Description

@sivaramn

The PGM course pdfs are on a different link and here's my small patch for getting the pdfs.

$ cat pgm.patch
diff --git a/coursera_downloader.py b/coursera_downloader.py
index e51f4b3..56451d8 100644
--- a/coursera_downloader.py
+++ b/coursera_downloader.py
@@ -136,6 +136,15 @@ def resolve_resources(br, path, course):
else:
print 'Can NOT match video names with subtitiles. Ignore...'
txt = []

  • if course == 'pgm':
  •    slides_pdf = 'https://class.coursera.org/pgm/wiki/view?page=LectureSlides'
    
  •    br.open(slides_pdf)
    
  •    for ll  in br.links():
    
  •        m_pdf = re.search(r'https*:[\S]+/([\S]+.pdf)', str(ll))
    
  •        if m_pdf is not None:
    
  •            pdf.append([resolve_name_with_hex(m_pdf.group(1)), m_pdf.group()])
    
    return video, srt, txt, pdf, pptx

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions