# Path: utils/config.py
# def get_config_section(section, filename='nthu_course.cfg'):
#     '''Return all config in that section'''
#     try:
#         config = configparser.ConfigParser()
#         config.optionxform = str
#         config.read(settings.BASE_DIR + '/NTHU_Course/config/' + filename)
#         return dict(config.items(section))
#     except Exception as ex:
#         # no config found
#         print(ex)
#         return {}


import re
import requests
import lxml.html
from itertools import zip_longest
from utils.config import get_config_section
# -*- encoding: utf-8 -*-




crawler_config = get_config_section('crawler')

encoding = crawler_config['encoding']  # big5 superset

form_url = crawler_config['form_url']
form_action_url = crawler_config['form_action_url']
syllabus_url = crawler_config['syllabus_url']
attachment_url = crawler_config['attachment_url']

# Path: utils/config.py
# def get_config_section(section, filename='nthu_course.cfg'):
#     '''Return all config in that section'''
#     try:
#         config = configparser.ConfigParser()
#         config.optionxform = str
#         config.read(settings.BASE_DIR + '/NTHU_Course/config/' + filename)
#         return dict(config.items(section))
#     except Exception as ex:
#         # no config found
#         print(ex)
#         return {}


# Path: crawler/course.py
import re
import requests
import lxml.html
from itertools import zip_longest
from utils.config import get_config_section

# -*- encoding: utf-8 -*-




crawler_config = get_config_section('crawler')

encoding = crawler_config['encoding']  # big5 superset

form_url = crawler_config['form_url']
form_action_url = crawler_config['form_action_url']
syllabus_url = crawler_config['syllabus_url']
attachment_url = crawler_config['attachment_url']

dept_url = crawler_config['dept_url']