Commit 987ac143 authored by alec mcginnis's avatar alec mcginnis

updated _parse_url for new public mega file link format
parent 631ca606
Pipeline #521 failed with stages
......@@ -191,9 +191,11 @@ class Mega:
def _parse_url(self, url):
# parse file id and key from url
if '!' in url:
match = re.findall(r'/#!(.*)', url)
path = match[0]
if '#' in url:
id = url.split("file/",5)[1]
key = id.split("#",5)[1]
id = id.split("#",5)[0]
path = str(id) + '!' + str(key)
return path
raise RequestError('Url key missing')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment