/ tags / {tag-name} / media / recent端点以意外顺序返回媒体

时间:2016-04-08 10:06:35

标签: instagram instagram-api

直到最近,/ tags / {标记名称} / media / recent endpoint按降序排列了'create_time'排序的媒体(从较新的帖子到较旧的帖子)。

但是最近有时会在序列中返回不符合此逻辑的帖子,请参阅以下示例:

A)获取带有“dinobots”标签的最新66个帖子(总共有两个请求发送到端点)。我只是在输出:

  1. data.media.create_time
  2. data.media.create_time格式化为日期
  3. data.media.id
  4. (请注意,我在4月5日进行了这项测试,我的总部设在西班牙 - UTC / GMT +2)

    [2016-04-05T14:25:39.356Z] instagram.getTagMedia | tag(dinobots) num(66)
    [2016-04-05T14:25:39.357Z] __send:  { method: 'GET',
      url: 'https://api.instagram.com/v1/tags/dinobots/media/recent',
      qs: 
       { access_token: '****',
         count: 66 } }
    * BATCH [1] i: time|date|id
      0: 1459831400|Tue Apr 05 2016 06:43:20 GMT+0200 (CEST)|1221476781088786637_2199878025
      1: 1459806250|Mon Apr 04 2016 23:44:10 GMT+0200 (CEST)|1221265804006866125_145907638
      2: 1459806030|Mon Apr 04 2016 23:40:30 GMT+0200 (CEST)|1221263961941362171_27800016
      3: 1459803502|Mon Apr 04 2016 22:58:22 GMT+0200 (CEST)|1221242752977508128_2270469004
      4: 1459797781|Mon Apr 04 2016 21:23:01 GMT+0200 (CEST)|1221194761482324932_1983283633
      5: 1459795141|Mon Apr 04 2016 20:39:01 GMT+0200 (CEST)|1221172616948852241_1481957792
      6: 1459791804|Mon Apr 04 2016 19:43:24 GMT+0200 (CEST)|1221144618979830053_16912825
      7: 1459759772|Mon Apr 04 2016 10:49:32 GMT+0200 (CEST)|1220875921490574745_2204054478
      8: 1459759199|Mon Apr 04 2016 10:39:59 GMT+0200 (CEST)|1220871112347505480_2138805147
      9: 1459747823|Mon Apr 04 2016 07:30:23 GMT+0200 (CEST)|1220775685988451266_47914511
     10: 1459739013|Mon Apr 04 2016 05:03:33 GMT+0200 (CEST)|1220701782779270200_2270469004
     11: 1459729994|Mon Apr 04 2016 02:33:14 GMT+0200 (CEST)|1220626120227496971_2135828656
     12: 1459723676|Mon Apr 04 2016 00:47:56 GMT+0200 (CEST)|1220573124211688587_1238240432
     13: 1459719310|Sun Apr 03 2016 23:35:10 GMT+0200 (CEST)|1220536498492875969_41021096
     14: 1459717291|Sun Apr 03 2016 23:01:31 GMT+0200 (CEST)|1220519563697845780_33587044
     15: 1459715451|Sun Apr 03 2016 22:30:51 GMT+0200 (CEST)|1220504122932520166_144254792
     16: 1459712975|Sun Apr 03 2016 21:49:35 GMT+0200 (CEST)|1220483356344851535_2878468462
     17: 1459711405|Sun Apr 03 2016 21:23:25 GMT+0200 (CEST)|1220470187338016380_1906413880
     18: 1459708173|Sun Apr 03 2016 20:29:33 GMT+0200 (CEST)|1220443073341475244_1542131713
     19: 1459613301|Sat Apr 02 2016 18:08:21 GMT+0200 (CEST)|1219647231831493625_1542131713
     20: 1459698643|Sun Apr 03 2016 17:50:43 GMT+0200 (CEST)|1220363133557136321_1188882549
     21: 1459693153|Sun Apr 03 2016 16:19:13 GMT+0200 (CEST)|1220317075470193760_2270469004
     22: 1459058162|Sun Mar 27 2016 07:56:02 GMT+0200 (CEST)|1214990384828005207_1263918085
     23: 1459653372|Sun Apr 03 2016 05:16:12 GMT+0200 (CEST)|1219983365973449998_1419533814
     24: 1459651472|Sun Apr 03 2016 04:44:32 GMT+0200 (CEST)|1219967435570941123_1981029098
     25: 1459650573|Sun Apr 03 2016 04:29:33 GMT+0200 (CEST)|1219959889556672450_1981029098
     26: 1459642678|Sun Apr 03 2016 02:17:58 GMT+0200 (CEST)|1219893664421601343_1163231623
     27: 1459627372|Sat Apr 02 2016 22:02:52 GMT+0200 (CEST)|1219765262644426706_2232444620
     28: 1459627347|Sat Apr 02 2016 22:02:27 GMT+0200 (CEST)|1219765056695711694_2232444620
     29: 1459627254|Sat Apr 02 2016 22:00:54 GMT+0200 (CEST)|1219764274558678968_2232444620
     30: 1459596410|Sat Apr 02 2016 13:26:50 GMT+0200 (CEST)|1219505541454432726_2993160193
     31: 1459571618|Sat Apr 02 2016 06:33:38 GMT+0200 (CEST)|1219297567633586097_286114876
     32: 1459562662|Sat Apr 02 2016 04:04:22 GMT+0200 (CEST)|1219222438194182711_637109093
    [2016-04-05T14:25:40.408Z] __send:  { method: 'GET',
      url: 'https://api.instagram.com/v1/tags/dinobots/media/recent',
      qs: 
       { access_token: '****',
         count: 33,
         max_tag_id: 'AQAC-_e5oN2cg42GK8tRVWHTR2l_bmPGUbqP63a__dZQJlod2KjspnJvRy98w3uzwz4o_wV8RqG2gCtMUXyV9-Gk1HZgVXWIoy1WLbyG0Q-iqzZ14zOsSqb7pF6zhFHIHRZcpxXxZLgrYjB_gLf9rzqonrQiKYfUmAO8u4inLODyzA' } }
    * BATCH [2] i: time|date|id
      0: 1459560102|Sat Apr 02 2016 03:21:42 GMT+0200 (CEST)|1219200967918851404_1703551892
      1: 1459547514|Fri Apr 01 2016 23:51:54 GMT+0200 (CEST)|1219095371524197270_195840369
      2: 1459544999|Fri Apr 01 2016 23:09:59 GMT+0200 (CEST)|1219074275068545453_2951569545
      3: 1459051997|Sun Mar 27 2016 06:13:17 GMT+0200 (CEST)|1214938669235826889_213123067
      4: 1459052492|Sun Mar 27 2016 06:21:32 GMT+0200 (CEST)|1214942819474469175_213123067
      5: 1459052556|Sun Mar 27 2016 06:22:36 GMT+0200 (CEST)|1214943359633715533_213123067
      6: 1459052611|Sun Mar 27 2016 06:23:31 GMT+0200 (CEST)|1214943818138251608_213123067
      7: 1459535486|Fri Apr 01 2016 20:31:26 GMT+0200 (CEST)|1218994468785293515_3091006857
      8: 1459533643|Fri Apr 01 2016 20:00:43 GMT+0200 (CEST)|1218979011884719530_14650742
      9: 1459504269|Fri Apr 01 2016 11:51:09 GMT+0200 (CEST)|1218732606116981179_2122189729
     10: 1459498332|Fri Apr 01 2016 10:12:12 GMT+0200 (CEST)|1218682803311688712_5849430
     11: 1459493347|Fri Apr 01 2016 08:49:07 GMT+0200 (CEST)|1218640983500340634_5849430
     12: 1459491118|Fri Apr 01 2016 08:11:58 GMT+0200 (CEST)|1218622286942690705_247086526
     13: 1459491082|Fri Apr 01 2016 08:11:22 GMT+0200 (CEST)|1218621983862283662_247086526
     14: 1459490181|Fri Apr 01 2016 07:56:21 GMT+0200 (CEST)|1218614421375354133_9584032
     15: 1459474952|Fri Apr 01 2016 03:42:32 GMT+0200 (CEST)|1218486678602978917_1322952884
     16: 1459461694|Fri Apr 01 2016 00:01:34 GMT+0200 (CEST)|1218375456665029004_31081201
     17: 1459458932|Thu Mar 31 2016 23:15:32 GMT+0200 (CEST)|1218352289019267493_2951569545
     18: 1459458729|Thu Mar 31 2016 23:12:09 GMT+0200 (CEST)|1218350586937149806_2951569545
     19: 1459458490|Thu Mar 31 2016 23:08:10 GMT+0200 (CEST)|1218348580767992124_2951569545
     20: 1459444761|Thu Mar 31 2016 19:19:21 GMT+0200 (CEST)|1218233415058429131_2864911124
     21: 1459443673|Thu Mar 31 2016 19:01:13 GMT+0200 (CEST)|1218224284066391892_250785520
     22: 1459429800|Thu Mar 31 2016 15:10:00 GMT+0200 (CEST)|1218107910669114954_10570422
     23: 1459428169|Thu Mar 31 2016 14:42:49 GMT+0200 (CEST)|1218094231797401013_346448872
     24: 1459396719|Thu Mar 31 2016 05:58:39 GMT+0200 (CEST)|1217830412005828696_2372444505
     25: 1459387494|Thu Mar 31 2016 03:24:54 GMT+0200 (CEST)|1217753025130548975_523181042
     26: 1459387375|Thu Mar 31 2016 03:22:55 GMT+0200 (CEST)|1217752027677564793_1419533814
     27: 1459386578|Thu Mar 31 2016 03:09:38 GMT+0200 (CEST)|1217745340402257415_523181042
     28: 1459377048|Thu Mar 31 2016 00:30:48 GMT+0200 (CEST)|1217665400246998751_239425100
     29: 1459353118|Wed Mar 30 2016 17:51:58 GMT+0200 (CEST)|1217464653344858895_2210453511
     30: 1459349295|Wed Mar 30 2016 16:48:15 GMT+0200 (CEST)|1217432584813406743_2122189729
     31: 1459308310|Wed Mar 30 2016 05:25:10 GMT+0200 (CEST)|1217088778175783414_1608359615
     32: 1459230785|Tue Mar 29 2016 07:53:05 GMT+0200 (CEST)|1216438454380937231_1582180015
    [2016-04-05T14:25:41.497Z] DONE
    

    我们可以在两个请求中看到意外行为:

    请求1

     18: 1459708173|Sun Apr 03 2016 20:29:33 GMT+0200 (CEST)|1220443073341475244_1542131713
     19: 1459613301|Sat Apr 02 2016 18:08:21 GMT+0200 (CEST)|1219647231831493625_1542131713
     20: 1459698643|Sun Apr 03 2016 17:50:43 GMT+0200 (CEST)|1220363133557136321_1188882549
     21: 1459693153|Sun Apr 03 2016 16:19:13 GMT+0200 (CEST)|1220317075470193760_2270469004
     22: 1459058162|Sun Mar 27 2016 07:56:02 GMT+0200 (CEST)|1214990384828005207_1263918085
     23: 1459653372|Sun Apr 03 2016 05:16:12 GMT+0200 (CEST)|1219983365973449998_1419533814
    

    我不希望帖子19和22出现在这个序列中(至少在这个位置)

    请求2

      2: 1459544999|Fri Apr 01 2016 23:09:59 GMT+0200 (CEST)|1219074275068545453_2951569545
      3: 1459051997|Sun Mar 27 2016 06:13:17 GMT+0200 (CEST)|1214938669235826889_213123067
      4: 1459052492|Sun Mar 27 2016 06:21:32 GMT+0200 (CEST)|1214942819474469175_213123067
      5: 1459052556|Sun Mar 27 2016 06:22:36 GMT+0200 (CEST)|1214943359633715533_213123067
      6: 1459052611|Sun Mar 27 2016 06:23:31 GMT+0200 (CEST)|1214943818138251608_213123067
      7: 1459535486|Fri Apr 01 2016 20:31:26 GMT+0200 (CEST)|1218994468785293515_3091006857
    

    同样适用于3到5(包括在内)的帖子

    非常感谢任何帮助。我最初将此查询发送给Instagram支持但尚未收到他们的消息。它并不总是发生,但我已经在几个标签中看到了这种奇怪的行为,使得按日期过滤的过程有点不一致。

    亲切的问候,

    大卫

0 个答案:

没有答案