<s> from flask import Flask <EOL> from flask_weixin import Weixin <EOL> app = Flask ( __name__ ) <EOL> app . secret_key = '<STR_LIT>' <EOL> app . config [ '<STR_LIT>' ] = '<STR_LIT>' <EOL> weixin = Weixin ( app ) <EOL> app . add_url_rule ( '<STR_LIT:/>' , view_func = weixin . view_func ) <EOL> jing_music = ( <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' <EOL> ) <EOL> @ weixin ( '<STR_LIT:*>' ) <EOL> def reply_all ( ** kwargs ) : <EOL> username = kwargs . get ( '<STR_LIT>' ) <EOL> sender = kwargs . get ( '<STR_LIT>' ) <EOL> message_type = kwargs . get ( '<STR_LIT:type>' ) <EOL> content = kwargs . get ( '<STR_LIT:content>' , message_type ) <EOL> if content == '<STR_LIT>' : <EOL> return weixin . reply ( <EOL> username , type = '<STR_LIT>' , sender = sender , <EOL> title = '<STR_LIT>' , <EOL> description = '<STR_LIT>' , <EOL> music_url = jing_music , <EOL> hq_music_url = jing_music , <EOL> ) <EOL> elif content == '<STR_LIT>' : <EOL> return weixin . reply ( <EOL> username , type = '<STR_LIT>' , sender = sender , <EOL> articles = [ <EOL> { <EOL> '<STR_LIT:title>' : '<STR_LIT>' , <EOL> '<STR_LIT:description>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT:url>' : '<STR_LIT>' , <EOL> } <EOL> ] <EOL> ) <EOL> else : <EOL> return weixin . reply ( <EOL> username , sender = sender , content = content <EOL> ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> app . run ( ) </s>
