fix: audit findings — edge cases in paginate, output, run

- paginate.py: max(nums) on empty set → guard
- paginate.py: HEAD fallback to GET if server doesn't support HEAD
- output.py: disk health check every 500 topics
- run.py: avoid page-1 extra redirect
- __main__.py: URL validation (must contain vwts.ru)
This commit is contained in:
2026-06-04 08:58:09 +03:00
parent 010b10c43e
commit 1cfa6d1595
4 changed files with 32 additions and 13 deletions
+2 -2
View File
@@ -25,8 +25,8 @@ logging.basicConfig(
)
if __name__ == "__main__":
if len(sys.argv) < 2:
print("❌ Укажи URL раздела. Пример:")
if len(sys.argv) < 2 or "vwts.ru" not in sys.argv[1]:
print("❌ Укажи URL раздела vwts.ru. Пример:")
print(" python -m vwts_scraper "
"https://vwts.ru/forum/vag/benzinovye-dvigateli/")
sys.exit(1)