Closed Planchee closed 2 months ago
Fix in downloadFile seems to be working: Line 108:
def downloadFile(url, file, post_data=None):
global accessurls
url = GetOrReplaceKey(url, False)
if "/" in file:
makeDirs(os.path.dirname(file))
if "?" in file:
file = file.split('?')[0]
# skip already downloaded files except index.html, which is really JSON possibly with newer access keys?
if os.path.exists(file):
logging.debug(f'Skipping url: {url} as already downloaded')
return
try:
response = requests.get(url, stream=True)
response.raise_for_status()
with open(file, 'wb') as f:
for chunk in response.iter_content(chunk_size=8192):
if chunk:
f.write(chunk)
logging.debug(f'Successfully downloaded: {url} to: {file}')
return
except requests.exceptions.HTTPError as err:
logging.warning(
f'URL error Handling {url} or will try alternative: {str(err)}')
# Try again but with different accessurls (very hacky!)
if "?t=" in url:
for accessurl in accessurls:
url2 = ""
try:
url2 = f"{url.split('?')[0]}?{accessurl}"
response = requests.get(url2, stream=True)
response.raise_for_status()
with open(file, 'wb') as f:
for chunk in response.iter_content(chunk_size=8192):
if chunk:
f.write(chunk)
logging.debug(
f'Successfully downloaded through alt: {url2} to: {file}')
return
except requests.exceptions.HTTPError as err:
logging.warning(
f'URL error alt method tried url {url2} Handling of: {str(err)}')
pass
logging.error(f'Failed to succeed for url {url}')
raise Exception
Edit; re-opened to make it visible. @Mu-ramadan.. feel free to update on your fork :)
thanks, I just fixed it.
Hi, this is not fixing the 401 issue. I'm facing the same problem. I'm receiving {"code":"access.forbidden","message":"Forbidden","retry":false}
On file ending with .dam it seems like _50k.dam
May be they have changed their system and there is not more _50k.dam
files ?
I can't seem to find files with .dam extension in the browser
Anybody knows ?
I installed the tor browser and tried it, but it failed. I replaced lines 123-128 of the last modified source code with the following code
try:
proxies = {
'http' : "socks5h://localhost:9150",
'https' : "socks5h://localhost:9150"
}
response = session.get(url, proxies=proxies)
assets/pan/2k assets/pan/high assets/pan/low
The images in the above folders could be retrieved, but the process stopped after that.
@hbirs with your proxy system did you still have the 401 error ?
{"code":"access.forbidden","message":"Forbidden","retry":false}
Try using https://github.com/mu-ramadan/matterport-dl.git it is a fork of the current project and it is 24 commits ahead and works much better and has 53 stars.
Hi thanks vikaskedia That repo is still giving a 401 it's like the file requested 50k.dam is not existing anymore: https://cdn-2.matterport.com/models/.....f/assets/~/....._50k.dam
Anyone with the same error ?
I still get error 401 when trying to download and it looks like the Reddit thread is now archived. Would love to download the walkthrough of my house we just listed.
It's a same. Seem Matterport have change something to avoid use this folk and those genius guys have no time for try to fix it (maybe it isn't possible to do it...) I shoulded have learned programing when I was young!!!
This should be fixed now, please test again on master and let us know if not.
This should be fixed now, please test again on master and let us know if not.
You are a genius! It works! Thanks a lot, mitchcapper.
Successful download on November 23rd, new download today won't work anymore. Using latest update of Mu-Ramandan (commit 06/12/23). It's throwing a 401 so is Matterport is blocking something in the access through the URL?