@@ -122,6 +122,7 @@ def parse_open_dccon_rel_path(data, url):
122122def parse_bridge_bbcc_general (data , url , relpath ):
123123 REGEX_DATA = r'dcConsData\s*=\s*\[(\s*({\s*[\s\S]*?}\s*)*)\s*,?\s*\]'
124124 REGEX_NAME = r'(name)(\s*:\s*")'
125+ REGEX_URI = r'(uri)(\s*:\s*")'
125126 REGEX_KEYWORDS = r'(keywords)(\s*:\s*\[)'
126127 REGEX_TAGS = r'(tags)(\s*:\s*\[)'
127128
@@ -131,6 +132,7 @@ def parse_bridge_bbcc_general(data, url, relpath):
131132
132133 dccons_jo = '[{elements}]' .format (elements = match .group (1 ))
133134 dccons_jo = re .sub (REGEX_NAME , r'"\1"\2' , dccons_jo )
135+ dccons_jo = re .sub (REGEX_URI , r'"\1"\2' , dccons_jo )
134136 dccons_jo = re .sub (REGEX_KEYWORDS , r'"\1"\2' , dccons_jo )
135137 dccons_jo = re .sub (REGEX_TAGS , r'"\1"\2' , dccons_jo )
136138
@@ -161,7 +163,13 @@ def parse_bridge_bbcc_general(data, url, relpath):
161163 if not isinstance (name , str ):
162164 abort (500 , 'Invalid data format: "name" on {index}th dccon must be string' .format (index = index + 1 ))
163165
164- path = urljoin (url , relpath .format (name = name ))
166+ if 'uri' in dccon :
167+ uri = dccon ['uri' ]
168+ if not isinstance (uri , str ):
169+ abort (500 , 'Invalid data format: "uri" on {index}th dccon must be string' .format (index = index + 1 ))
170+ path = uri
171+ else :
172+ path = urljoin (url , relpath .format (name = name ))
165173
166174 for keyword in keywords :
167175 if not isinstance (keyword , str ):
0 commit comments