def send_articles(self, user_id, articles, account=None):
if isinstance(articles, (tuple, list)):<EOL><INDENT>articles_data = []<EOL>for article in articles:<EOL><INDENT>articles_data.append({<EOL>'<STR_LIT:title>': article['<STR_LIT:title>'],<EOL>'<STR_LIT:description>': article['<STR_LIT:description>'],<EOL>'<STR_LIT:url>': article['<STR_LIT:url>'],<EOL>'<STR_LIT>': article.get('<STR_LIT:image>', article.get('<STR_LIT>')),<EOL>})<EOL><DEDENT>data = {<EOL>'<STR_LIT>': user_id,<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': {<EOL>'<STR_LIT>': articles_data<EOL>}<EOL>}<EOL><DEDENT>else:<EOL><INDENT>data = {<EOL>'<STR_LIT>': user_id,<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': {<EOL>'<STR_LIT>': articles,<EOL>}<EOL>}<EOL><DEDENT>return self._send_custom_message(data, account=account)<EOL>
发送图文消息

详情请参考
http://mp.weixin.qq.com/wiki/7/12a5a320ae96fecdf0e15cb06123de9f.html

:param user_id: 用户 ID 。 就是你收到的 `Message` 的 source
:param articles: 一个包含至多10个图文的数组, 或者微信图文消息素材 media_id
:param account: 可选，客服账号
:return: 返回的 JSON 数据包