Skip to content

Instantly share code, notes, and snippets.

@rebane2001
Last active July 6, 2021 11:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rebane2001/c4586ac4ef0b30264e93233097b218dc to your computer and use it in GitHub Desktop.
Save rebane2001/c4586ac4ef0b30264e93233097b218dc to your computer and use it in GitHub Desktop.
matterport-dl expiration patch
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