Last active
July 6, 2021 11:11
-
-
Save rebane2001/c4586ac4ef0b30264e93233097b218dc to your computer and use it in GitHub Desktop.
matterport-dl expiration patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
import os.path | |
for p in ["showcase.js","js/showcase.js"]: | |
if os.path.isfile(p): | |
with open(p,"r",encoding="UTF-8") as f: | |
j = f.read() | |
with open(p,"w",encoding="UTF-8") as f: | |
f.write(re.sub(r"\&\&\(!e.expires\|\|.{1,10}\*e.expires>Date.now\(\)\)","",j)) | |
print("Patched!") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment