mirror of
				https://github.com/tiyn/stud.ip-crawler.git
				synced 2025-10-30 18:51:17 +01:00 
			
		
		
		
	bugfixes: now all courses in the curr semester get downloaded
- limit for courses was set to low to display current courses - unused variable docs was removed from local function
This commit is contained in:
		| @@ -67,7 +67,7 @@ class Crawler: | ||||
|         self.create_dir(base_dir) | ||||
|         curr_courses = self.studip.get_curr_courses( | ||||
|             self.studip.get_uid(), self.studip.get_curr_semester()) | ||||
|         log.info('crawling all current courses' + curr_courses) | ||||
|         log.info('crawling all current courses') | ||||
|         os.chdir(base_dir) | ||||
|         for course in curr_courses: | ||||
|             log.debug('course is ' + curr_courses[course]) | ||||
|   | ||||
| @@ -4,6 +4,7 @@ import logging as log | ||||
| #from tqdm import tqdm | ||||
| import requests as req | ||||
| from requests.auth import HTTPBasicAuth | ||||
| import json | ||||
|  | ||||
|  | ||||
| class Studip: | ||||
| @@ -72,7 +73,7 @@ class Studip: | ||||
|         Returns: | ||||
|         string: id of the current semester | ||||
|         """ | ||||
|         rsp = self.auth_req('/api.php/user/' + user_id + '/courses') | ||||
|         rsp = self.auth_req('/api.php/user/' + user_id + '/courses?limit=1000') | ||||
|         ord_sems = self.get_ordered_semesters() | ||||
|         courses = rsp.json()['collection'] | ||||
|         course_list = {} | ||||
| @@ -158,7 +159,6 @@ class Studip: | ||||
|         """ | ||||
|         rsp = self.auth_req('/api.php/folder/' + folder) | ||||
|         subdirs = rsp.json()['subfolders'] | ||||
|         docs = rsp.json()['file_refs'] | ||||
|         res_subdirs = {} | ||||
|         for subdir in subdirs: | ||||
|             sub_id = subdir['id'] | ||||
|   | ||||
		Reference in New Issue
	
	Block a user