fix: resolve pagespeed quota permission error and add lxml parser
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions

Move quota file from scripts/ to /tmp/ (writable by gunicorn process).
Add lxml to requirements for faster, more reliable HTML parsing in SEO audits.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Maciej Pienczyn 2026-03-07 20:49:21 +01:00
parent 6c6f8054d2
commit 3c67968505
2 changed files with 3 additions and 2 deletions

View File

@ -36,6 +36,7 @@ user-agents>=2.2.0
pdfplumber>=0.10.0 pdfplumber>=0.10.0
# SEO Analysis # SEO Analysis
lxml==5.4.0
beautifulsoup4==4.14.3 beautifulsoup4==4.14.3
selectolax==0.4.6 selectolax==0.4.6
python-whois==0.9.6 python-whois==0.9.6

View File

@ -144,8 +144,8 @@ class RateLimiter:
if quota_file: if quota_file:
self.quota_file = Path(quota_file) self.quota_file = Path(quota_file)
else: else:
# Default to scripts directory # Default to /tmp (writable by any user, resets on reboot which is fine for daily quota)
self.quota_file = Path(__file__).parent / '.pagespeed_quota.json' self.quota_file = Path('/tmp/.pagespeed_quota.json')
self._load_quota() self._load_quota()