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 +4 -4
- data/lib/zorki/scrapers/post_scraper.rb +14 -2
- data/lib/zorki/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5d6f47b685aa9f49c602bc0082e7ac9084e0cb444acfa6a7989c5d5cd3d572e7
|
4
|
+
data.tar.gz: 858f01c64e0efa666941222d0fade285f0c49843957cdbc0adc0dbe46e7c7ec0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
-
|
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