社区所有版块导航
Python
python开源   Django   Python   DjangoApp   pycharm  
DATA
docker   Elasticsearch  
aigc
aigc   chatgpt  
WEB开发
linux   MongoDB   Redis   DATABASE   NGINX   其他Web框架   web工具   zookeeper   tornado   NoSql   Bootstrap   js   peewee   Git   bottle   IE   MQ   Jquery  
机器学习
机器学习算法  
Python88.com
反馈   公告   社区推广  
产品
短视频  
印度
印度  
Py学习  »  Python

Python新工具:用三行代码提取PDF表格数据

机器学习研究会订阅号 • 5 年前 • 700 次点击  


从 PDF 表格中获取数据是一项痛苦的工作。不久前,一位开发者提供了一个名为 Camelot 的工具,使用三行代码就能从 PDF 文件中提取表格数据。


PDF 文件是一种非常常用的文件格式,通常用于正式的电子版文件。它能够很好的将不同的排版格式固定下来,形成版面清晰且美观的展示效果。然而,对于想要从 PDF 中提取信息的人们来说,PDF 是个噩梦,尤其是表格。
大量的学术报告、论文、分析文章都使用 PDF 展示其中的表格数据,但是对于如果想要直接从表格中复制数据则会非常麻烦。不久前,有一位开发者提供了一个可从文字 PDF 中提取表格信息的工具——Camelot,能够直接将大部分表格转换为 Pandas 的 Dataframe。


  • 项目地址:https://github.com/camelot-dev/camelot


Camelot 是什么


据项目介绍称,Camelot 是一个 Python 工具,用于将 PDF 文件中的表格数据提取出来。


具体而言,用户可以像使用 Pandas 那样打开 PDF 文件,然后利用这个工具提取表格数据,最后再指定输出的形式(如 csv 文件)。


代码示例


项目提供的 PDF 文件如图所示,假设用户需要提取这些文字之间的表格 2-1 中的信息。
PDF 文件。我们需要提取表格 2-1。


使用 Camelot 提取表格数据的代码如下:


>>> import camelot
>>> tables = camelot.read_pdf('foo.pdf'#类似于Pandas打开CSV文件的形式
>>> tables[0].df # get a pandas DataFrame!
>>> tables.export('foo.csv', f='csv', compress=True# json, excel, html, sqlite,可指定输出格式
>>> tables[0].to_csv('foo.csv'# to_json, to_excel, to_html, to_sqlite, 导出数据为文件
>>> tables
1>
>>> tables[0]
7, 7)> # 获得输出的格式
>>> tables[0].parsing_report
{
    'accuracy'99.02,
    'whitespace'12.24,
    'order'1,
    'page'1
}


以下为输出的结果,对于合并的单元格,Camelot 在抽取后做了空行处理,这是一个稳妥的方法。



安装方法


项目作者提供了三种安装方法。首先,你可以使用 Conda 进行安装,这是最简单的。


conda install -c conda-forge camelot-py

最流行的安装方法是使用 pip 安装。


pip install camelot-py[cv]

还可以从项目中克隆代码,并使用源码安装。


git clone https://www.github.com/camelot-dev/camelot
cd camelot
pip install ".[cv]"


想要了解更多资讯,请扫描下方二维码,关注机器学习研究会

                                          


转自:机器之心

    已同步到看一看

    发送中

    -1 ) { window.vConsolePlugins = []; _addVConsole('//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/vconsole/3.2.2/vconsole.min440203.js', function() { _addVConsole('//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/vconsole/plugin/vconsole-mpopt/1.0.1/vconsole-mpopt42f400.js', _loadVConsolePlugin); }); } try { var adIframeUrl = localStorage.getItem('__WXLS_ad_iframe_url'); if (window === top) { if (adIframeUrl) { if (navigator.userAgent.indexOf('iPhone') > -1) { var img = new Image(); img.src = adIframeUrl; } else { var link = document.createElement('link'); link.rel = 'prefetch'; link.href = adIframeUrl; document.getElementsByTagName('head')[0].appendChild(link); } } } } catch (err) { } })(); parent_width ? parent_width : width, outerW = getOuterW(dom)||0, outerH = getOuterH(dom)||0, videoW = width - outerW, videoH = videoW/ratio_, height = videoH + outerH; return {w:Math.ceil(width),h:Math.ceil(height),vh:videoH,vw:videoW,ratio:ratio_}; }; (function(){ var iframe = document.getElementsByTagName('iframe'); for (var i=0,il=iframe.length;i=0 && child.getAttribute("data-vid")==vid){ child.style.cssText += "height: " + h + "px !important;"; child.style.display = ""; } } } } })(); })(); var new_appmsg = 1; var item_show_type = "0"; var can_see_complaint = "0"; var not_in_mm_css = "//res.wx.qq.com/mmbizwap/zh_CN/htmledition/style/page/appmsg_new/not_in_mm473e11.css"; var windowwx_css = "//res.wx.qq.com/mmbizwap/zh_CN/htmledition/style/page/appmsg_new/winwx473e11.css"; var article_improve_combo_css = "//res.wx.qq.com/mmbizwap/zh_CN/htmledition/style/page/appmsg_new/combo486877.css"; var tid = ""; var aid = ""; var clientversion = ""; var appuin = "MzU1NTUxNTM0Mg=="||""; var source = "0"; var ascene = ""; var subscene = ""; var sessionid = ""||"svr_dfec2e84fd2"; var abtest_cookie = ""; var scene = 75; var itemidx = ""; var appmsg_token = ""; var _copyright_stat = "0"; var _ori_article_type = ""; var is_follow = ""; var nickname = "机器学习研究会订阅号"; var appmsg_type = "9"; var ct = "1570621828"; var user_name = "gh_7ce29bea153b"; var user_name_new = ""; var fakeid = ""; var version = ""; var is_limit_user = "0"; var round_head_img = "http://img2.jintiankansha.me/get?src=http://mmbiz.qpic.cn/mmbiz_png/ibAQnkbS3TkbuDpu9sKtkybYKpAicicNVaaqus1sxx1JY2jKUtJqgJOL4mnHib5r0tbkQyK5vWR5HPYQwlgVZlPHMA/0?wx_fmt=png"; var hd_head_img = "http://wx.qlogo.cn/mmhead/Q3auHgzwzM4aH2kEwsfprFeLC4Nx5OqNBEIMARZoh35Dg4DJ30Ua2A/0"||""; var ori_head_img_url = "http://wx.qlogo.cn/mmhead/Q3auHgzwzM4aH2kEwsfprFeLC4Nx5OqNBEIMARZoh35Dg4DJ30Ua2A/132"; var msg_title = "Python新工具:用三行代码提取PDF表格数据"; var msg_desc = "从 PDF 表格中获取数据是一项痛苦的工作。不久前,一位开发者提供了一个名为 Camelot 的工具,使用三"; var msg_cdn_url = "http://img2.jintiankansha.me/get?src=http://mmbiz.qpic.cn/mmbiz_jpg/ibAQnkbS3TkbBbwAKp59Oakva13gwqRiaGqfPvXeMLjv3Ob2PRQiczIOJO7icfJibCicBcOVbyuwqJkp6xzqA4xibPAyQ/0?wx_fmt=jpeg"; var cdn_url_1_1 = "http://img2.jintiankansha.me/get?src=http://mmbiz.qpic.cn/mmbiz_jpg/ibAQnkbS3TkbBbwAKp59Oakva13gwqRiaGVnfAiajOh0Ka4E9lDzEjWMicibHV4NhNGQluHTMZYj1IVibzpZG5O5cFbQ/0?wx_fmt=jpeg"; var cdn_url_235_1 = "http://img2.jintiankansha.me/get?src=http://mmbiz.qpic.cn/mmbiz_jpg/ibAQnkbS3TkbBbwAKp59Oakva13gwqRiaGqfPvXeMLjv3Ob2PRQiczIOJO7icfJibCicBcOVbyuwqJkp6xzqA4xibPAyQ/0?wx_fmt=jpeg"; var msg_link = "http://mp.weixin.qq.com/s?__biz=MzU1NTUxNTM0Mg==&mid=2247492087&idx=1&sn=afc7168d82ece3b666d65db22f092aca&chksm=fbd18d56cca6044003b50c0554721192991694a1038de415e6f8902f598f60b2a9b452f90681#rd"; var user_uin = "0"*1; var msg_source_url = ''; var img_format = 'jpeg'; var srcid = ''; var req_id = '1002yI2HoB9BFiowKFDp8cjk'; var networkType; var appmsgid = '' || '2247492087'|| ""; var comment_id = "1023906076951019522" || "1023906076951019522" * 1; var comment_enabled = "" * 1; var is_need_reward = "0" * 1; var is_https_res = ("" * 1) && (location.protocol == "https:"); var msg_daily_idx = "1" || ""; var profileReportInfo = "" || ""; var devicetype = ""; var source_encode_biz = ""; var source_username = ""; var reprint_ticket = ""; var source_mid = ""; var source_idx = ""; var source_biz = ""; var author_id = ""; var optimizing_flag = "0" * 1; var show_comment = "0"; var __appmsgCgiData = { wxa_product : ""*1, wxa_cps : ""*1, show_msg_voice: "0"*1, can_use_page : "0"*1, is_wxg_stuff_uin : "0"*1, card_pos : "", copyright_stat : "0", source_biz : "", hd_head_img : "http://wx.qlogo.cn/mmhead/Q3auHgzwzM4aH2kEwsfprFeLC4Nx5OqNBEIMARZoh35Dg4DJ30Ua2A/0"||(window.location.protocol+"//"+window.location.host + "//res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/pic/appmsg/pic_rumor_link.2x42f400.jpg") }; var _empty_v = "//res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/pic/pages/voice/empty42f400.mp3"; var copyright_stat = "0" * 1; var hideSource = "" * 1; var pay_fee = "" * 1; var pay_timestamp = ""; var need_pay = "" * 1; var need_report_cost = "0" * 1; var use_tx_video_player = "0" * 1; var appmsg_fe_filter = "contenteditable"; var friend_read_source = "" || ""; var friend_read_version = "" || ""; var friend_read_class_id = "" || ""; var is_only_read = "1" * 1; var read_num = "" * 1; var like_num = "" * 1; var liked = "" == 'true' ? true : false; var is_temp_url = "" ? 1 : 0; var send_time = ""; var icon_emotion_switch = "//res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/icon/appmsg/emotion/icon_emotion_switch46b604.svg"; var icon_emotion_switch_active = "//res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/icon/appmsg/emotion/icon_emotion_switch_active46b604.svg"; var icon_emotion_switch_primary = "//res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/icon/appmsg/emotion/icon_emotion_switch_primary46b604.svg"; var icon_emotion_switch_active_primary = "//res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/icon/appmsg/emotion/icon_emotion_switch_active_primary46b604.svg"; var icon_loading_white = "//res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/icon/common/icon_loading_white42f400.gif"; var icon_audio_unread = "//res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/icon/appmsg/audio/icon_audio_unread42f400.png"; var icon_qqmusic_default = "//res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/icon/appmsg/qqmusic/icon_qqmusic_default.2x42f400.png"; var icon_qqmusic_source = "//res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/icon/appmsg/qqmusic/icon_qqmusic_source42f400.png"; var icon_kugou_source = "//res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/icon/appmsg/kugou/icon_kugou_source42f400.png"; var topic_default_img = '//res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/icon/appmsg/topic/pic_book_thumb.2x42f400.png'; var comment_edit_icon = '//res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/icon/appmsg_new/icon_edit42f400.png'; var comment_loading_img = '//res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/icon/common/icon_loading_white42f400.gif'; var voice_in_appmsg = { "1":"1" }; var reprint_style = ''*1; var wxa_img_alert = "" != 'false'; var img_popup = 1; var more_read_type = '0'*1; var weapp_sn_arr_json = "" || ""; var ban_scene = "0" * 1; var svr_time = "1570645552" * 1; var is_transfer_msg = ""*1||0; var malicious_title_reason_id = "0" * 1; var malicious_content_type = "0" * 1; var modify_time = ""; var isprofileblock = "0"; var hotspotInfoList = [ ]; var jumpInfo = [ ]; window.wxtoken = "777"; window.is_login = '0' * 1; window.__moon_initcallback = function(){ if(!!window.__initCatch){ window.__initCatch({ idkey : 27611+2, startKey : 0, limit : 128, badjsId: 43, reportOpt : { uin : uin, biz : biz, mid : mid, idx : idx, sn : sn }, extInfo : { network_rate : 0.01, badjs_rate: 0.1 } }); } } var title ="机器学习研究会订阅号"; var is_new_msg=true; var is_wash = '' * 1; var show_top_bar = '0' * 1; var topbarEnable = false; var enterid = "" * 1 || 0; var appid_list = ""; var defaultAvatarUrl = '//res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/pic/common/avatar_default46e3e2.svg'; document.addEventListener('DOMContentLoaded', function () { window.domCompleteTime = Date.now(); }); window.__moon_host = 'res.wx.qq.com';window.__moon_mainjs = 'appmsg/index.js';window.moon_map = {"new_video/plugin/util.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/new_video/plugin/util4847c6.js","pages/iframe_communicate.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/iframe_communicate4848aa.js","new_video/player.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/new_video/player.html485189.js","biz_wap/zepto/touch.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/zepto/touch42f400.js","biz_wap/zepto/event.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/zepto/event42f400.js","biz_wap/zepto/zepto.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/zepto/zepto440203.js","page/pages/video.css":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/style/page/pages/video.css486877.js","a/tpl/smallbanner_msg_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/tpl/smallbanner_msg_tpl.html42f400.js","a/tpl/smallbanner_info_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/tpl/smallbanner_info_tpl.html44c2e3.js","a/tpl/banner_info_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/tpl/banner_info_tpl.html42f400.js","a/tpl/promote_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/tpl/promote_tpl.html42f400.js","a/tpl/smallcard_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/tpl/smallcard_tpl.html42f400.js","a/tpl/info_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/tpl/info_tpl.html42f400.js","a/tpl/cardticket_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/tpl/cardticket_tpl.html42f400.js","a/tpl/banner_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/tpl/banner_tpl.html47af5b.js","a/tpl/sponsor_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/tpl/sponsor_tpl.html42f400.js","a/tpl/new_cpc_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/tpl/new_cpc_tpl.html45178d.js","appmsg/emotion/caret.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/emotion/caret42f400.js","pages/audition_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/audition_tpl.html47a8e6.js","biz_wap/utils/localstorage.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/localstorage42f400.js","appmsg/emotion/emotion_pc.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/emotion/emotion_pc4830e1.js","appmsg/friend_comment_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/friend_comment_tpl.html42f400.js","appmsg/comment_pc_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/comment_pc_tpl.html4830e1.js","appmsg/comment_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/comment_tpl.html4830e1.js","biz_wap/utils/fakehash.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/fakehash42f400.js","appmsg/emotion/selection.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/emotion/selection4830e1.js","appmsg/comment_report.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/comment_report4690d8.js","a/appdialog_confirm.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/appdialog_confirm.html42f400.js","widget/wx_profile_dialog_primary.css":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/style/widget/wx_profile_dialog_primary.css42f400.js","new_video/player.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/new_video/player4847c6.js","a/tpl/mpda_bottom_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/tpl/mpda_bottom_tpl.html450c68.js","a/tpl/crt_size_map.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/tpl/crt_size_map4602fc.js","biz_wap/jsapi/cardticket.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/jsapi/cardticket42f400.js","biz_common/utils/emoji_panel_data.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/utils/emoji_panel_data42f400.js","appmsg/emotion/textarea.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/emotion/textarea42f400.js","appmsg/emotion/nav.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/emotion/nav42f400.js","appmsg/emotion/common.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/emotion/common42f400.js","appmsg/emotion/slide.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/emotion/slide42f400.js","appmsg/emotion/dom.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/emotion/dom42f400.js","pages/musicUrlReport.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/musicUrlReport47f34b.js","biz_wap/jsapi/log.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/jsapi/log4673d5.js","pages/player_tips.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/player_tips47a8e6.js","pages/music_report_conf.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/music_report_conf42f400.js","pages/report.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/report489695.js","pages/player_adaptor.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/player_adaptor42f400.js","pages/music_player.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/music_player473e5d.js","biz_common/utils/emoji_data.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/utils/emoji_data45112f.js","appmsg/more_read_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/more_read_tpl.html42f400.js","appmsg/i18n.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/i18n489c04.js","appmsg/retry_ajax.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/retry_ajax451cc4.js","complain/tips.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/complain/tips42f400.js","pages/loadscript.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/loadscript42f400.js","biz_wap/utils/ajax_load_js.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/ajax_load_js42f400.js","appmsg/comment.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/comment48ce4f.js","appmsg/reward_entry.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/reward_entry46ef12.js","a/ios.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/ios42f400.js","a/android.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/android457bcb.js","a/profile.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/profile455ab4.js","a/app_card.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/app_card485189.js","a/sponsor.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/sponsor4576f8.js","a/tpl/cpc_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/tpl/cpc_tpl.html450c68.js","a/appdialog_confirm.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/appdialog_confirm471cb1.js","biz_common/dom/offset.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/dom/offset4690d8.js","a/video.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/video482376.js","a/tpl/crt_tpl_manager.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/tpl/crt_tpl_manager450d79.js","a/cpc_a_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/cpc_a_tpl.html485189.js","a/sponsor_a_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/sponsor_a_tpl.html42f400.js","a/a_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/a_tpl.html485189.js","a/mpshop.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/mpshop42f400.js","a/wxopen_card.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/wxopen_card42f400.js","a/card.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/card42f400.js","biz_wap/utils/position.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/position42f400.js","a/a_report.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/a_report4402ec.js","biz_wap/utils/show_time.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/show_time4543c6.js","biz_common/utils/get_para_list.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/utils/get_para_list491139.js","biz_wap/utils/openUrl.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/openUrl4402ec.js","a/a_sign.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/a_sign452c49.js","appmsg/my_comment_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/my_comment_tpl.html4847c6.js","appmsg/cmt_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/cmt_tpl.html46b604.js","sougou/a_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/sougou/a_tpl.html42f400.js","appmsg/emotion/emotion.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/emotion/emotion46b604.js","biz_common/utils/report.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/utils/report42f400.js","appmsg/articleReport.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/articleReport42f400.js","biz_wap/jsapi/leaveReport.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/jsapi/leaveReport482a87.js","biz_wap/utils/hand_up_state.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/hand_up_state42f400.js","biz_wap/utils/storage.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/storage42f400.js","biz_common/utils/http.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/utils/http42f400.js","biz_common/utils/cookie.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/utils/cookie42f400.js","appmsg/topic_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/topic_tpl.html42f400.js","question_answer/appmsg_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/question_answer/appmsg_tpl.html491139.js","pages/weapp_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/weapp_tpl.html42f400.js","biz_common/utils/monitor.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/utils/monitor42f400.js","pages/voice_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/voice_tpl.html42f400.js","pages/kugoumusic_ctrl.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/kugoumusic_ctrl47cb36.js","pages/qqmusic_ctrl.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/qqmusic_ctrl47cb36.js","pages/voice_component.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/voice_component482b98.js","pages/qqmusic_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/qqmusic_tpl.html42f400.js","new_video/ctl.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/new_video/ctl4532b3.js","pages/utils.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/utils47da67.js","appmsg/open_url_with_webview.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/open_url_with_webview440203.js","appmsg/more_read.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/more_read4576f8.js","appmsg/like.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/like4830e1.js","appmsg/share_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/share_tpl.html42f400.js","appmsg/appmsgext.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/appmsgext47e0e8.js","appmsg/img_copyright_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/img_copyright_tpl.html42f400.js","pages/video_ctrl.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/video_ctrl42f400.js","pages/create_txv.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/create_txv42f400.js","appmsg/comment_utils.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/comment_utils42f400.js","appmsg/reward_utils.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/reward_utils46e54d.js","biz_common/ui/imgonepx.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/ui/imgonepx42f400.js","appmsg/malicious_wording.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/malicious_wording42f400.js","biz_common/jquery.md5.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/jquery.md542f400.js","biz_common/base64.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/base6442f400.js","biz_common/utils/wxgspeedsdk.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/utils/wxgspeedsdk42f400.js","pages/version4video.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/version4video4848aa.js","a/a_config.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/a_config488f70.js","a/a_utils.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/a_utils482376.js","a/a.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/a48c8bf.js","rt/appmsg/getappmsgext.rt.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/rt/appmsg/getappmsgext.rt42f400.js","pages/video_communicate_adaptor.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/pages/video_communicate_adaptor471b11.js","biz_wap/utils/ajax_wx.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/ajax_wx485651.js","biz_common/utils/respTypes.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/utils/respTypes42f400.js","biz_wap/utils/log.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/log42f400.js","sougou/index.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/sougou/index42f400.js","biz_wap/safe/mutation_observer_report.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/safe/mutation_observer_report42f400.js","appmsg/fereport.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/fereport438bee.js","appmsg/fereport_without_localstorage.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/fereport_without_localstorage438bee.js","appmsg/report.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/report4765b8.js","appmsg/report_and_source.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/report_and_source450c68.js","appmsg/page_pos.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/page_pos482a87.js","appmsg/cdn_speed_report.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/cdn_speed_report4765b8.js","appmsg/wxtopic.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/wxtopic42f400.js","question_answer/appmsg.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/question_answer/appmsg491139.js","appmsg/weapp.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/weapp485189.js","appmsg/weproduct.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/weproduct4576f8.js","appmsg/voicemsg.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/voicemsg42f400.js","appmsg/autoread.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/autoread42f400.js","appmsg/voice.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/voice42f400.js","appmsg/qqmusic.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/qqmusic47cb36.js","appmsg/iframe.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/iframe486f18.js","question_answer/utils.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/question_answer/utils491139.js","appmsg/product.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/product4576f8.js","appmsg/review_image.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/review_image46a084.js","appmsg/outer_link.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/outer_link489adf.js","appmsg/copyright_report.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/copyright_report4847c6.js","appmsg/async.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/async47aa37.js","biz_wap/ui/lazyload_img.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/ui/lazyload_img42f400.js","biz_common/log/jserr.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/log/jserr42f400.js","appmsg/share.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/share475580.js","appmsg/cdn_img_lib.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/cdn_img_lib42f400.js","appmsg/finance_communicate.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/finance_communicate453348.js","page/appmsg_new/not_in_mm.css":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/style/page/appmsg_new/not_in_mm.css473e11.js","page/appmsg_new/combo.css":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/style/page/appmsg_new/combo.css486877.js","appmsg/popup_report.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/popup_report488f96.js","complain/localstorage.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/complain/localstorage42f400.js","common/utils.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/common/utils48ce4f.js","biz_wap/utils/wapsdk.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/wapsdk44c130.js","a/mpAdAsync.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/mpAdAsync485651.js","biz_common/utils/url/parse.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/utils/url/parse440451.js","appmsg/appmsg_report.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/appmsg_report475580.js","biz_common/moment.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/moment42f400.js","biz_wap/jsapi/core.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/jsapi/core48ce4f.js","biz_common/dom/event.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/dom/event445789.js","appmsg/test.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/test42f400.js","biz_wap/utils/mmversion.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/mmversion45fc7f.js","appmsg/max_age.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/max_age42f400.js","biz_common/dom/attr.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/dom/attr42f400.js","biz_wap/utils/ajax.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/ajax48ce4f.js","appmsg/log.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/log42f400.js","biz_common/dom/class.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/dom/class42f400.js","biz_wap/utils/device.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/device4830e1.js","appmsg/weapp_common.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/weapp_common48ce4f.js","biz_common/utils/string/html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/utils/string/html42f400.js","cps/tpl/list_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/cps/tpl/list_tpl.html42f400.js","cps/tpl/card_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/cps/tpl/card_tpl.html42f400.js","cps/tpl/banner_tpl.html.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/cps/tpl/banner_tpl.html42f400.js","biz_common/tmpl.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/tmpl485189.js","appmsg/index.js":"//res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/index480909.js"}; 0){ i("POST",location.protocol+"//mp.weixin.qq.com/mp/jsmonitor?","idkey="+x.join(";")+"&r="+Math.random()+"&lc="+g.length+p); var m=1; if(w&&w.badjs_rate&&(m=w.badjs_rate),Math.random()=10))try{ D.call(window.localStorage,e,o); }catch(n){ n.stack&&console&&console.error&&console.error("[TryCatch]"+n.stack),window.__moon_report([{ offset:x, log:"localstorage_error;"+n.toString(), e:n }]),B++,B>=3&&window.moon&&window.moon.clear&&moon.clear(); } }; } window.seajs&&p&&(window.define=function(){ for(var o,n=[],t=arguments&&arguments[0],i=0,a=arguments.length;a>i;i++){ var s=o=arguments[i]; "function"==typeof o&&(o=function(){ try{ return s.apply(this,arguments); }catch(o){ throw"string"==typeof t&&console.error("[TryCatch][DefineeErr]id:"+t),o.stack&&console&&console.error&&console.error("[TryCatch]"+o.stack), h&&window.__moon_report&&window.__moon_report([{ offset:g, log:"define_error;id:"+t+";", e:o }]),e(" [define_error]"+JSON.stringify(r(o))),o; } },o.toString=function(e){ return function(){ return e.toString(); }; }(arguments[i])),n.push(o); } return p.apply(this,n); }); }(),function(o){ function n(e,o,n){ return window.__DEBUGINFO?(window.__DEBUGINFO.res_list||(window.__DEBUGINFO.res_list=[]), window.__DEBUGINFO.res_list[e]?(window.__DEBUGINFO.res_list[e][o]=n,!0):!1):!1; } function t(e){ var o=new TextEncoder("utf-8").encode(e),n=crypto.subtle||crypto.webkitSubtle; return n.digest("SHA-256",o).then(function(e){ return r(e); }); } function r(e){ for(var o=[],n=new DataView(e),t=0;tr;++r)if(o.call(n,e[r],r,e)===!1)return; }else{ if("Object"!==t&&a!=e)throw"unsupport type"; if(a==e){ for(var r=e.length-1;r>=0;r--){ var s=a.key(r),c=a.getItem(s); if(o.call(n,c,s,e)===!1)return; } return; } for(var r in e)if(e.hasOwnProperty(r)&&o.call(n,e[r],r,e)===!1)return; } } } var a=o.localStorage,s=document.head||document.getElementsByTagName("head")[0],c=1,d=11,_=12,l=13,m=window.__allowLoadResFromMp?1:2,w=window.__allowLoadResFromMp?1:0,u=m+w,f=window.testenv_reshost||window.__moon_host||"res.wx.qq.com",p=new RegExp("^(http(s)?:)?//"+f); window.__loadAllResFromMp&&(f="mp.weixin.qq.com",m=0,u=m+w); var h={ prefix:"__MOON__", loaded:[], unload:[], clearSample:!0, hit_num:0, mod_num:0, version:1003, cacheData:{ js_mod_num:0, js_hit_num:0, js_not_hit_num:0, js_expired_num:0, css_mod_num:0, css_hit_num:0, css_not_hit_num:0, css_expired_num:0 }, init:function(){ h.loaded=[],h.unload=[]; var e,n,r; if(window.no_moon_ls&&(h.clearSample=!0),a){ var s="_moon_ver_key_",c=a.getItem(s); c!=h.version&&(h.clear(),a.setItem(s,h.version)); } if((-1!=location.search.indexOf("no_moon1=1")||-1!=location.search.indexOf("no_lshttps=1"))&&h.clear(), a){ var d=1*a.getItem(h.prefix+"clean_time"),_=+new Date; if(_-d>=1296e6){ h.clear(); try{ !!a&&a.setItem(h.prefix+"clean_time",+new Date); }catch(l){} } } i(moon_map,function(i,s){ if(n=h.prefix+s,r=!!i&&i.replace(p,""),e=!!a&&a.getItem(n),version=!!a&&(a.getItem(n+"_ver")||"").replace(p,""), h.mod_num++,r&&-1!=r.indexOf(".css")?h.cacheData.css_mod_num++:r&&-1!=r.indexOf(".js")&&h.cacheData.js_mod_num++, h.clearSample||!e||r!=version)h.unload.push(r.replace(p,"")),r&&-1!=r.indexOf(".css")?e?r!=version&&h.cacheData.css_expired_num++:h.cacheData.css_not_hit_num++:r&&-1!=r.indexOf(".js")&&(e?r!=version&&h.cacheData.js_expired_num++:h.cacheData.js_not_hit_num++);else{ if("https:"==location.protocol&&window.moon_hash_map&&window.moon_hash_map[s]&&window.crypto)try{ t(e).then(function(e){ window.moon_hash_map[s]!=e&&console.log(s); }); }catch(c){} try{ var d="//# sourceURL="+s+"\n//@ sourceURL="+s; o.eval.call(o,'define("'+s+'",[],'+e+")"+d),h.hit_num++,r&&-1!=r.indexOf(".css")?h.cacheData.css_hit_num++:r&&-1!=r.indexOf(".js")&&h.cacheData.js_hit_num++; }catch(c){ h.unload.push(r.replace(p,"")); } } }),h.load(h.genUrl()); }, genUrl:function(){ var e=h.unload; if(!e||e.length<=0)return[]; var o,n,t="",r=[],i={},a=-1!=location.search.indexOf("no_moon2=1"),s="//"+f; -1!=location.href.indexOf("moon_debug2=1")&&(s="//mp.weixin.qq.com"); for(var c=0,d=e.length;d>c;++c){ /^\/(.*?)\//.test(e[c]); var _=/^\/(.*?)\//.exec(e[c]); _.length<2||!_[1]||(n=_[1],t=i[n],t?(o=t+","+e[c],o.length>1e3||a?(r.push(t+"?v="+h.version), t=location.protocol+s+e[c],i[n]=t):(t=o,i[n]=t)):(t=location.protocol+s+e[c],i[n]=t)); } for(var l in i)i.hasOwnProperty(l)&&r.push(i[l]); return r; }, load:function(e){ if(window.__wxgspeeds&&(window.__wxgspeeds.mod_num=h.mod_num,window.__wxgspeeds.hit_num=h.hit_num), !e||e.length<=0)return seajs.combo_status=seajs.COMBO_LOADED,seajs.run(),console.debug&&console.debug("[moon] load js complete, all in cache, cost time : 0ms, total count : "+h.mod_num+", hit num: "+h.hit_num), void window.__moonclientlog.push("[moon] load js complete, all in cache, cost time : 0ms, total count : "+h.mod_num+", hit num: "+h.hit_num); seajs.combo_status=seajs.COMBO_LOADING; var o=0,n=+new Date; window.__wxgspeeds&&(window.__wxgspeeds.combo_times=[],window.__wxgspeeds.combo_times.push(n)), i(e,function(t){ h.request(t,u,function(){ if(window.__wxgspeeds&&window.__wxgspeeds.combo_times.push(+new Date),o++,o==e.length){ var t=+new Date-n; window.__wxgspeeds&&(window.__wxgspeeds.mod_downloadtime=t),seajs.combo_status=seajs.COMBO_LOADED, seajs.run(),console.debug&&console.debug("[moon] load js complete, url num : "+e.length+", total mod count : "+h.mod_num+", hit num: "+h.hit_num+", use time : "+t+"ms"), window.__moonclientlog.push("[moon] load js complete, url num : "+e.length+", total mod count : "+h.mod_num+", hit num: "+h.hit_num+", use time : "+t+"ms"); } }); }); }, request:function(o,t,r){ if(o){ t=t||0,o.indexOf("mp.weixin.qq.com")>-1&&((new Image).src=location.protocol+"//mp.weixin.qq.com/mp/jsmonitor?idkey=27613_32_1&r="+Math.random(), window.__moon_report([{ offset:_, log:"load_script_from_mp: "+o }],1)); var i=-1; window.__DEBUGINFO&&(__DEBUGINFO.res_list||(__DEBUGINFO.res_list=[]),__DEBUGINFO.res_list.push({ type:"js", status:"pendding", start:+new Date, end:0, url:o }),i=__DEBUGINFO.res_list.length-1),-1!=location.search.indexOf("no_lshttps=1")&&(o=o.replace("http://","https://")); var a=document.createElement("script"); a.src=o,a.type="text/javascript",a.async=!0,a.down_time=+new Date,a.onerror=function(s){ n(i,"status","error"),n(i,"end",+new Date); var _=new Error(s); if(t>=0)if(w>t){ var m=o.replace("res.wx.qq.com","mp.weixin.qq.com"); h.request(m,t,r); }else h.request(o,t,r);else window.__moon_report&&window.__moon_report([{ offset:c, log:"load_script_error: "+o, e:_ }],1); if(t==w-1&&window.__moon_report([{ offset:d, log:"load_script_error: "+o, e:_ }],1),-1==t){ var u="ua: "+window.navigator.userAgent+", time="+(+new Date-a.down_time)+", load_script_error -1 : "+o; window.__moon_report([{ offset:l, log:u }],1); } window.__moonclientlog.push("moon load js error : "+o+", error -> "+_.toString()), e("moon_request_error url:"+o); },"undefined"!=typeof moon_crossorigin&&moon_crossorigin&&a.setAttribute("crossorigin",!0), a.onload=a.onreadystatechange=function(){ n(i,"status","loaded"),n(i,"end",+new Date),!a||a.readyState&&!/loaded|complete/.test(a.readyState)||(n(i,"status","200"), a.onload=a.onreadystatechange=null,"function"==typeof r&&r()); },t--,s.appendChild(a),e("moon_request url:"+o+" retry:"+t); } }, setItem:function(e,o){ !!a&&a.setItem(e,o); }, clear:function(){ a&&(i(a,function(e,o){ ~o.indexOf(h.prefix)&&a.removeItem(o); }),console.debug&&console.debug("[moon] clear")); }, idkeyReport:function(e,o,n){ n=n||1; var t=e+"_"+o+"_"+n; (new Image).src="/mp/jsmonitor?idkey="+t+"&r="+Math.random(); } }; seajs&&seajs.use&&"string"==typeof window.__moon_mainjs&&seajs.use(window.__moon_mainjs), window.moon=h; }(window),function(){ try{ Math.random()<1; }catch(e){} }(),window.moon.init(); }; e(),!!window.__moon_initcallback&&window.__moon_initcallback(),window.__wxgspeeds&&(window.__wxgspeeds.moonendtime=+new Date); } } var WX_BJ_REPORT=window.WX_BJ_REPORT||{}; !function(e){ function o(e,o,n,t,r,i){ return{ name:e||"", message:o||"", file:n||"", line:t||"", col:r||"", stack:i&&i.stack||"" }; } function n(e){ var o=t(e); return{ name:e.name, key:e.message, msg:e.message, stack:o.info, file:o.file, line:o.line, col:o.col, client_version:"", _info:e._info }; } function t(o){ o._info=o._info||""; var n=o.stack||"",t={ info:n, file:o.file||"", line:o.line||"", col:o.col||"" }; if(""==t.file){ var r=n.split(/\bat\b/); if(r&&r[1]){ var i=/(https?:\/\/[^\n]+)\:(\d+)\:(\d+)/.exec(r[1]); i&&(i[1]&&i[1]!=t.file&&(t.file&&(o._info+=" [file: "+t.file+" ]"),t.file=i[1]), i[2]&&i[2]!=t.line&&(t.line&&(o._info+=" [line: "+t.line+" ]"),t.line=i[2]),i[3]&&i[3]!=t.col&&(t.col&&(o._info+=" [col: "+t.col+" ]"), t.col=i[3])); } } return t&&t.file&&t.file.length 0&&(t.info=t.info.replace(new RegExp(t.file.split("?")[0],"gi"),"__FILE__")), e.BadJs.ignorePath&&(t.info=t.info.replace(/http(s)?\:[^:\n]*\//gi,"").replace(/\n/gi,"")), t; } if(!e.BadJs){ var r="BadjsWindowError",i=function(e,o){ for(var n in o)e[n]=o[n]; return e; }; return e.BadJs={ uin:0, mid:"", view:"wap", _cache:{}, _info:{}, _hookCallback:null, ignorePath:!0, "throw":function(e,o){ throw this.onError(e,o),e; }, onError:function(o,t){ try{ if(1==o.BADJS_EXCUTED)return; o.BADJS_EXCUTED=!0; var r=n(o); if(r.uin=this.uin,r.mid=this.mid,r.view=this.view,r.cmdb_module="mmbizwap",t&&(r=i(r,t)), r.cid&&(r.key="["+r.cid+"]:"+r.key),o._info&&(r.msg+=" || e.info:"+o._info),"{}"!=JSON.stringify(this._info)&&(r.msg+=" || info:"+JSON.stringify(this._info)), "function"==typeof this._hookCallback&&this._hookCallback(r)===!1)return; return this._send(r),e.BadJs; }catch(o){ console.error(o); } }, winErr:function(n){ n.error&&n.error.BADJS_EXCUTED||e.BadJs.onError(o(r,n.message,n.filename,n.lineno,n.colno,n.error)); }, init:function(o,n,t){ return this.uin=o||this.uin,this.mid=n||this.mid,this.view=t||this.view,e.BadJs; }, hook:function(o){ return this._hookCallback=o,e.BadJs; }, _send:function(o){ if(!o.mid){ if("undefined"==typeof window.PAGE_MID||!window.PAGE_MID)return; o.mid=window.PAGE_MID; } o.uin||(o.uin=window.user_uin||0); var n=[o.mid,o.name,o.key].join("|"); if(!this._cache||!this._cache[n])return this._cache&&(this._cache[n]=!0),this._xhr(o), e.BadJs; }, _xhr:function(e){ var o; if(window.ActiveXObject)try{ o=new ActiveXObject("Msxml2.XMLHTTP"); }catch(n){ try{ o=new ActiveXObject("Microsoft.XMLHTTP"); }catch(t){ o=!1; } }else window.XMLHttpRequest&&(o=new XMLHttpRequest); var r=""; for(var i in e)i&&e[i]&&(r+=[i,"=",encodeURIComponent(e[i]),"&"].join("")); if(o&&o.open)o.open("POST","https://badjs.weixinbridge.com/report",!0),o.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"), o.onreadystatechange=function(){},o.send(r.slice(0,-1));else{ var a=new Image; a.src="https://badjs.weixinbridge.com/report?"+r; } }, report:function(e,n,t){ return this.onError(o(e,n),t),this; }, mark:function(e){ this._info=i(this._info,e); }, nocache:function(){ return this._cache=!1,e.BadJs; } },window.addEventListener&&window.addEventListener("error",e.BadJs.winErr),e.BadJs; } }(WX_BJ_REPORT),__moonf__(); }, 25);
    Python社区是高质量的Python/Django开发社区
    本文地址:http://www.python88.com/topic/46654
     
    700 次点击