syncMyMoodle 0.2.2__tar.gz → 0.2.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {syncmymoodle-0.2.2/syncMyMoodle.egg-info → syncmymoodle-0.2.3}/PKG-INFO +1 -1
- {syncmymoodle-0.2.2 → syncmymoodle-0.2.3}/setup.cfg +1 -1
- {syncmymoodle-0.2.2 → syncmymoodle-0.2.3/syncMyMoodle.egg-info}/PKG-INFO +1 -1
- {syncmymoodle-0.2.2 → syncmymoodle-0.2.3}/syncmymoodle/__main__.py +19 -3
- {syncmymoodle-0.2.2 → syncmymoodle-0.2.3}/LICENSE +0 -0
- {syncmymoodle-0.2.2 → syncmymoodle-0.2.3}/README.md +0 -0
- {syncmymoodle-0.2.2 → syncmymoodle-0.2.3}/pyproject.toml +0 -0
- {syncmymoodle-0.2.2 → syncmymoodle-0.2.3}/syncMyMoodle.egg-info/SOURCES.txt +0 -0
- {syncmymoodle-0.2.2 → syncmymoodle-0.2.3}/syncMyMoodle.egg-info/dependency_links.txt +0 -0
- {syncmymoodle-0.2.2 → syncmymoodle-0.2.3}/syncMyMoodle.egg-info/requires.txt +0 -0
- {syncmymoodle-0.2.2 → syncmymoodle-0.2.3}/syncMyMoodle.egg-info/top_level.txt +0 -0
- {syncmymoodle-0.2.2 → syncmymoodle-0.2.3}/syncmymoodle/__init__.py +0 -0
|
@@ -226,10 +226,26 @@ class SyncMyMoodle:
|
|
|
226
226
|
with cookie_file.open("wb") as f:
|
|
227
227
|
pickle.dump(self.session.cookies, f)
|
|
228
228
|
return
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
229
|
+
|
|
230
|
+
# Create a separate soup for maintenance detection
|
|
231
|
+
soup_check = bs(resp.text, features="html.parser")
|
|
232
|
+
|
|
233
|
+
# Remove known info banners
|
|
234
|
+
for banner in soup_check.select(".themeboostunioninfobanner"):
|
|
235
|
+
banner.decompose()
|
|
236
|
+
|
|
237
|
+
# Extract body text after cleanup
|
|
238
|
+
body_text = soup_check.find("body").get_text(separator=" ", strip=True)
|
|
239
|
+
|
|
240
|
+
# Check for maintenance notice
|
|
241
|
+
if "Wartungsarbeiten" in body_text:
|
|
242
|
+
logger.critical(
|
|
243
|
+
"Detected Maintenance mode! If this is an error, please report it on GitHub."
|
|
244
|
+
)
|
|
245
|
+
logger.info("Cleaned page body:\n%s", body_text)
|
|
232
246
|
sys.exit()
|
|
247
|
+
|
|
248
|
+
soup = bs(resp.text, features="html.parser")
|
|
233
249
|
if soup.find("input", {"name": "RelayState"}) is None:
|
|
234
250
|
csrf_token = soup.find("input", {"name": "csrf_token"})["value"]
|
|
235
251
|
login_data = {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|