fix: 更改到demo mode,否則看不到公告
This commit is contained in:
parent
7ee2006aa0
commit
6a07008303
@ -1,7 +1,7 @@
|
||||
import time
|
||||
import requests
|
||||
from bs4 import BeautifulSoup
|
||||
from api.tools import getUrlParam, findAll, find
|
||||
from api.tools import *
|
||||
import json
|
||||
|
||||
class Moodle():
|
||||
@ -113,8 +113,8 @@ class Moodle():
|
||||
|
||||
url = "https://moodle.ncnu.edu.tw/course/view.php?id={}"
|
||||
response = self.session.get(url.format(courseID))
|
||||
# dateBlock = findAll(response, 'li', param={'class': 'section main clearfix'})[-2]
|
||||
block = find(response, 'li', param={'class': 'section main clearfix current'})
|
||||
block = findAll(response, 'li', param={'class': 'section main clearfix'})[-2]
|
||||
# block = find(response, 'li', param={'class': 'section main clearfix current'})
|
||||
|
||||
if block:
|
||||
links = block.findAll('li')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user