Explorer
/proc/123/root/tmp/fix_meta_regex.py
← Zurück ↓ Download
from pathlib import Path
p=Path('/opt/estructura/no') if False else Path('/opt/struktur/social-media-radar/intake/meta_ads_intake.py')
s=p.read_text()
s=s.replace(r"r'Started running on\\s+([^\\n]+)'", r"r'Started running on\s+([^\n]+)'")
s=s.replace(r"r'(?:Library ID|Identificación de la biblioteca):\\s*(\\d+)'", r"r'(?:Library ID|Identificación de la biblioteca):\s*(\d+)'")
p.write_text(s)