simennj / itsdownloading

Python script for bulk downloading files from itslearning
16 stars 4 forks source link

Nedlasting av besvarelser #4

Closed jon-mey closed 7 years ago

jon-mey commented 7 years ago

Konge det her. Men mulig å få til inkludering av leverte besvarelser?

simennj commented 7 years ago

Burde være mulig å få til ved å legge til besvarelser i download_urls her.

def download_from_essay_page(directory, link_url):
    essay_page = session.get(link_url)
    download_urls = fromstring(essay_page.content).xpath(
        '//div[@id="EssayDetailedInformation_FileListWrapper_FileList"]/ul/li/a/@href')
    for download_url in download_urls:
        download_file(directory, download_url)

Skal se nærmere på det neste uke når eksamensperioden er over.

bartvbl commented 7 years ago

@jameyer If I can plug my version; it catches as good as everything, including submitted answers and grades:

https://github.com/bartvbl/itslearning-dumper

simennj commented 7 years ago

Added support for downloading assignment answers in v1.2.0 today.