(?:(?!<).)*)<\/a>', '' + re_data + '', data, 1)
else:
break
return data
async def plusing(data_in):
try:
curs.execute(db_change("insert into back (title, link, type) values (?, ?, ?)"), [data_in[1], data_in[0], data_in[2]])
except:
pass
async def main_async(data):
run_all = [asyncio.ensure_future(plusing(data_in)) for data_in in data]
await asyncio.gather(*run_all)
def render_do(title, data, num, include):
curs.execute(db_change('select data from other where name = "markup"'))
rep_data = curs.fetchall()
if rep_data[0][0] == 'namumark':
data = namumark(conn, data, title, num, include)
elif rep_data[0][0] == 'js_namumark':
data = [
'' + html.escape(data) + '
',
'',
[]
]
elif rep_data[0][0] == 'markdown':
data = markdown(conn, data, title, num)
elif rep_data[0][0] == 'raw':
data = [data, '', []]
else:
data = ['', '', []]
if num == 1:
loop = asyncio.new_event_loop()
loop.run_until_complete(main_async(data[2]))
loop.close()
conn.commit()
if num == 2:
return [data[0], data[1]]
else:
return data[0] + data[1]