mirror of
https://github.com/house-of-vanity/fesmoo_perdoliq.git
synced 2025-07-07 14:04:06 +00:00
Update cookies.
This commit is contained in:
@ -112,6 +112,7 @@ def do_action(update):
|
||||
update.message.reply_text("Fetching tests...")
|
||||
sleep(5)
|
||||
tests = list_test(s[1], s[2])
|
||||
#print("******",tests)
|
||||
else:
|
||||
update.message.reply_markdown("Usage: */list <user[text]>"\
|
||||
" <pass[text]>*")
|
||||
@ -122,6 +123,7 @@ def do_action(update):
|
||||
return False
|
||||
msg = "Here is an available tests:\n``` "
|
||||
i = 0
|
||||
#print("******",tests)
|
||||
for subj in tests:
|
||||
msg = msg + (" [%s] %s\n" % (i, subj))
|
||||
i += 1
|
||||
|
3
main.py
3
main.py
@ -39,6 +39,7 @@ class Perdoliq:
|
||||
settings.fesmu_root_url + 'startstu.aspx',
|
||||
cookies={'ASP.NET_SessionId': self.SessionId})
|
||||
soup = BeautifulSoup(r.text, "html.parser")
|
||||
#print("****** ", soup)
|
||||
_p = re.compile(',.*$')
|
||||
self.name = _p.sub(
|
||||
'', soup.find(id="ctl00_MainContent_Label1").get_text())[14:]
|
||||
@ -143,7 +144,7 @@ class Perdoliq:
|
||||
"There isn't any correct answers for %s. Looks like"\
|
||||
" something went wrong. Trying other way...", q_number
|
||||
)
|
||||
# send all checkboxes as answer to 30th page
|
||||
# send all checkboxes as answer to 30th page (4 answers questions)
|
||||
requests.post(
|
||||
settings.fesmu_root_url + 'studtst2.aspx',
|
||||
data=settings.merge(
|
||||
|
84
settings.py
84
settings.py
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user