Преглед изворни кода

pref: 优化附件数据结构

wuwenyi пре 10 месеци
родитељ
комит
5152d4c201
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      facebook/data_handler.py

+ 1 - 1
facebook/data_handler.py

@@ -24,7 +24,7 @@ def get_post_by_doc(response):
     actor = {k: v for k, v in actor.items() if k in user_require_fields}
     result = {
         'text': content_story['message']['text'],
-        'attachments': jsonpath.jsonpath(data, '$..styles.attachment.all_subattachments.nodes'),
+        'attachments': jsonpath.jsonpath(data, '$..styles.attachment.all_subattachments.nodes')[0],
         'post_id': content_story['post_id'],
 
         'actor': actor,