zorki 0.2.4 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 92619beb5d1040cbab5fd2733fb9bf0d61260e424137ac380f43f6b9b1abc560
4
- data.tar.gz: d50ab33a23e01277ae94149ea1bce2758c4fe54e64aa9a301ac6fb84069c92ee
3
+ metadata.gz: 5d6f47b685aa9f49c602bc0082e7ac9084e0cb444acfa6a7989c5d5cd3d572e7
4
+ data.tar.gz: 858f01c64e0efa666941222d0fade285f0c49843957cdbc0adc0dbe46e7c7ec0
5
5
  SHA512:
6
- metadata.gz: 92ee5f59ed8c65667ed250609f69dc4fd8163797a6b71679baaa758b40e39d3835398a813ace58b4b26019ed1675b81bc6c780a8e38b443d5344826ece822600
7
- data.tar.gz: a9f8b0258cef20f4c436732f988a2bcf0c44334753eacc9f2684d4e0b3b44cf98ef62269139f4261bbd49be22c8151c5e97bf552f30845d149a34c7055a3a5c9
6
+ metadata.gz: 73a9ac083a40f2e7c8b03a315bd50b83545507ed9e1700d944fa8e1e0e781ce8cad6ff5a17e277d83bd1788cd7444774c5ae530be8c3205213c7dfcbfb27c9c4
7
+ data.tar.gz: 201bc5e5eab638249bd4fb1e5dd859ed308e1e6fdbc4438d709144aa519bcef393404a8206929636944f65217af7e8597a6b8589f1a86f16ea3c6513e5806487
@@ -135,9 +135,21 @@ module Zorki
135
135
  # Go through the entire JSON structure (below for now) and make sure it hits all the points
136
136
 
137
137
  object = graphql_object["data"]["xdt_shortcode_media"]
138
- date = object["edge_media_to_caption"]["edges"].first["node"]["created_at"]
138
+
139
+ begin
140
+ date = object["edge_media_to_caption"]["edges"].first["node"]["created_at"]
141
+ rescue StandardError
142
+ date = object["taken_at_timestamp"].to_s
143
+ end
144
+
139
145
  date = DateTime.strptime(date, "%s")
140
- text = object["edge_media_to_caption"]["edges"].first["node"]["text"]
146
+
147
+ begin
148
+ text = object["edge_media_to_caption"]["edges"].first["node"]["text"]
149
+ rescue StandardError
150
+ text = ""
151
+ end
152
+
141
153
  number_of_likes = object["edge_media_preview_like"]["count"]
142
154
  username = object["owner"]["username"]
143
155
  id = object["shortcode"]
data/lib/zorki/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Zorki
4
- VERSION = "0.2.4"
4
+ VERSION = "0.2.5"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zorki
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christopher Guess