zorki 0.2.1 → 0.2.3

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: 360620c86ba91caf49a0e41a0362654620f60da706c761f3f9429757f570c7a4
4
- data.tar.gz: 442628f21ce102c28e22f2aa0cc9243fe1c836267a6901cd53c5f094fe778444
3
+ metadata.gz: dc52913230d63a501d9d7fba1ebb80f11cd5f47031711d0cb287da2a6b16fc93
4
+ data.tar.gz: 0c4aec5fcdf10a82265e9f2c405021ced45dd2c76e1e5b4ed9b8cbd275d680cf
5
5
  SHA512:
6
- metadata.gz: bb9d411327c46d63229dfc8e43cfcfb43d14a4b6a87615d07aa7871a29a9d0fe7390ef018134eb358314300fa1a67c0e976a43fd0357e7eea0efac4b4afede30
7
- data.tar.gz: 5ef69f54c80920ebfacf7520c851b06649b81262df809041bb6e97a981e8fd237ccea5b7d8972b4332e2a78fe25330171af9d0f62c9dfc2ccf2029cd0409044a
6
+ metadata.gz: 80036f9121369b7684ef6ba739be20c83b305c53c4959f7af8918a573f0af1755a4793a8f8c089b1040618bf8c6c15229948de8d7383c10dc5b67cb63bd6a7bc
7
+ data.tar.gz: b3cb6f9e5846df66990294c78f8aa925e5205e413a7ef463affa9a165c98cb5cb8a24e6110b3d90486425549899d87bff8ce3872384a57cbca0baf634f2005d8
@@ -2,6 +2,7 @@
2
2
 
3
3
  require "typhoeus"
4
4
 
5
+ # rubocop:disable Metrics/ClassLength
5
6
  module Zorki
6
7
  class PostScraper < Scraper
7
8
  def parse(id)
@@ -43,12 +44,20 @@ module Zorki
43
44
  #
44
45
  # TODO: Check if post is available publically before trying to login
45
46
  # Should help with the scraping
46
- login
47
+ # login
48
+ # graphql_object = get_content_of_subpage_from_url(
49
+ # "https://www.instagram.com/p/#{id}/",
50
+ # "/graphql/query",
51
+ # "data,xdt_shortcode_media,edge_sidecar_to_children",
52
+ # post_data_include: "PolarisPostRootQuery"
53
+ # )
54
+
47
55
  graphql_object = get_content_of_subpage_from_url(
48
- "https://www.instagram.com/p/#{id}/",
49
- "/graphql",
50
- "data,xdt_api__v1__media__shortcode__web_info,items"
51
- )
56
+ "https://www.instagram.com/p/#{id}/",
57
+ "/graphql/query",
58
+ nil,
59
+ post_data_include: "shortcode"
60
+ )
52
61
 
53
62
  graphql_object = graphql_object.first if graphql_object.kind_of?(Array)
54
63
 
@@ -81,11 +90,13 @@ module Zorki
81
90
  video_preview_image_url = graphql_object["video"].first["thumbnailUrl"]
82
91
  video_preview_image = Zorki.retrieve_media(video_preview_image_url)
83
92
  end
84
- else
93
+ elsif graphql_object.has_key?("items") || !graphql_object.dig("data", "xdt_api__v1__media__shortcode__web_info", "items").nil?
85
94
  # We need to see if this is a single image post or a slideshow. We do that
86
95
  # by looking for a single image, if it's not there, we assume the alternative.
87
96
  # debugger
88
- # graphql_object = graphql_object["data"]["xdt_api__v1__media__shortcode__web_info"]
97
+ unless graphql_object.has_key?("items")
98
+ graphql_object = graphql_object["data"]["xdt_api__v1__media__shortcode__web_info"]
99
+ end
89
100
 
90
101
  unless graphql_object["items"][0].has_key?("video_versions") && !graphql_object["items"][0]["video_versions"].nil?
91
102
  # Check if there is a slideshow or not
@@ -119,12 +130,49 @@ module Zorki
119
130
 
120
131
  date = DateTime.strptime(graphql_object["items"][0]["taken_at"].to_s, "%s")
121
132
  number_of_likes = graphql_object["items"][0]["like_count"]
133
+ elsif graphql_object.has_key?("data")
134
+ # TODO This is the new way of doing things, we need to figure it out
135
+ # Go through the entire JSON structure (below for now) and make sure it hits all the points
136
+
137
+ object = graphql_object["data"]["xdt_shortcode_media"]
138
+ date = object["edge_media_to_caption"]["edges"].first["node"]["created_at"]
139
+ date = DateTime.strptime(date, "%s")
140
+ text = object["edge_media_to_caption"]["edges"].first["node"]["text"]
141
+ number_of_likes = object["edge_media_preview_like"]["count"]
142
+ username = object["owner"]["username"]
143
+ id = object["shortcode"]
144
+
145
+ images = []
146
+ video = nil
147
+ video_preview_image = nil
148
+
149
+ if object.has_key?("edge_sidecar_to_children")
150
+ object["edge_sidecar_to_children"]["edges"].each do |edge|
151
+ media = Zorki.retrieve_media(edge["node"]["display_resources"].last["src"])
152
+ images << media if edge["node"]["is_video"] == false
153
+
154
+ if edge["node"]["is_video"] == true
155
+ video = media
156
+ video_preview_image = Zorki.retrieve_media(edge["node"]["display_resources"]["display_url"])
157
+ break # We only support one video right now, we'll fix later
158
+ end
159
+ end
160
+ elsif object.has_key?("display_resources")
161
+ if object["is_video"] == true
162
+ video = Zorki.retrieve_media(object["display_resources"].last["src"])
163
+ video_preview_image = Zorki.retrieve_media(object["display_url"])
164
+ else
165
+ images << Zorki.retrieve_media(object["display_resources"].last["src"])
166
+ end
167
+ end
168
+
169
+ user = User.from_post_data(object["owner"])
122
170
  end
123
171
 
124
172
  screenshot_file = take_screenshot()
125
173
 
126
174
  # This has to run last since it switches pages
127
- user = User.lookup([username]).first
175
+ user = User.lookup([username]).first if defined?(user).nil?
128
176
 
129
177
  {
130
178
  images: images,
@@ -143,16 +191,732 @@ module Zorki
143
191
  # First check if a post has a fact check overlay, if so, clear it.
144
192
  # The only issue is that this can take *awhile* to search. Not sure what to do about that
145
193
  # since it's Instagram's fault for having such a fucked up obfuscated hierarchy
146
- begin
147
- find_button("See Post").click
148
- sleep(0.1)
149
- rescue Capybara::ElementNotFound
150
- # Do nothing if the element is not found
151
- end
194
+ #
195
+ # Disabling this because it doesn't work right now when we're not logging in
196
+ # Eventually we want to especially get the login modal closed
197
+ # begin
198
+ # find_button("Close").click
199
+ # sleep(1)
200
+ # find_button("See Post").click
201
+ # sleep(0.1)
202
+ # rescue Capybara::ElementNotFound
203
+ # # Do nothing if the element is not found
204
+ # end
152
205
 
153
206
  # Take the screenshot and return it
154
207
  # rubocop:disable Link/Debugger
155
208
  save_screenshot("#{Zorki.temp_storage_location}/instagram_screenshot_#{SecureRandom.uuid}.png")
209
+ rescue Selenium::WebDriver::Error::TimeoutError
210
+ nil
156
211
  end
157
212
  end
158
213
  end
214
+
215
+ # {"xdt_shortcode_media"=>
216
+ # {"__typename"=>"XDTGraphSidecar",
217
+ # "__isXDTGraphMediaInterface"=>"XDTGraphSidecar",
218
+ # "id"=>"2542603930174846004",
219
+ # "shortcode"=>"CNJJM2elXQ0",
220
+ # "thumbnail_src"=>
221
+ # "https://scontent-lga3-1.cdninstagram.com/v/t51.29350-15/166780469_489667965807274_3707647015587575071_n.jpg?stp=c82.0.1276.1276a_dst-jpg_e35_s640x640_sh0.08&_nc_ht=scontent-lga3-1.cdninstagram.com&_nc_cat=110&_nc_ohc=in9T9HwRz9QQ7kNvgH8bokx&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYBT02El_YryYIJstdVTLEA-SgPQWiSTqyPIAXfdn2sZKw&oe=6714A2A4&_nc_sid=d885a2",
222
+ # "dimensions"=>{"height"=>957, "width"=>1080},
223
+ # "gating_info"=>nil,
224
+ # "fact_check_overall_rating"=>nil,
225
+ # "fact_check_information"=>nil,
226
+ # "sensitivity_friction_info"=>nil,
227
+ # "sharing_friction_info"=>{"should_have_sharing_friction"=>false, "bloks_app_url"=>nil},
228
+ # "media_overlay_info"=>nil,
229
+ # "media_preview"=>nil,
230
+ # "display_url"=>
231
+ # "https://scontent-lga3-1.cdninstagram.com/v/t51.29350-15/166780469_489667965807274_3707647015587575071_n.jpg?stp=dst-jpg_e35_s1080x1080&_nc_ht=scontent-lga3-1.cdninstagram.com&_nc_cat=110&_nc_ohc=in9T9HwRz9QQ7kNvgH8bokx&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYCqUfuAbAFl8tgRP3hTj9XIv33hCOnm9y-sXLZlAM4zhQ&oe=6714A2A4&_nc_sid=d885a2",
232
+ # "display_resources"=>
233
+ # [{"src"=>
234
+ # "https://scontent-lga3-1.cdninstagram.com/v/t51.29350-15/166780469_489667965807274_3707647015587575071_n.jpg?stp=dst-jpg_e35_s640x640_sh0.08&efg=eyJ2ZW5jb2RlX3RhZyI6ImltYWdlX3VybGdlbi4xNDQweDEyNzYuc2RyLmYyOTM1MC5kZWZhdWx0X2ltYWdlIn0&_nc_ht=scontent-lga3-1.cdninstagram.com&_nc_cat=110&_nc_ohc=in9T9HwRz9QQ7kNvgH8bokx&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYBe0iBZl_DMs37jdzJZDgLkWwIuKQKb5OtPFUIooZcORg&oe=6714A2A4&_nc_sid=d885a2",
235
+ # "config_width"=>640,
236
+ # "config_height"=>567},
237
+ # {"src"=>
238
+ # "https://scontent-lga3-1.cdninstagram.com/v/t51.29350-15/166780469_489667965807274_3707647015587575071_n.jpg?stp=dst-jpg_e35_s750x750_sh0.08&efg=eyJ2ZW5jb2RlX3RhZyI6ImltYWdlX3VybGdlbi4xNDQweDEyNzYuc2RyLmYyOTM1MC5kZWZhdWx0X2ltYWdlIn0&_nc_ht=scontent-lga3-1.cdninstagram.com&_nc_cat=110&_nc_ohc=in9T9HwRz9QQ7kNvgH8bokx&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYAM1JEf70NHUWyBKEQ3VqeZnMW4H5ypDMYCydofcR1eng&oe=6714A2A4&_nc_sid=d885a2",
239
+ # "config_width"=>750,
240
+ # "config_height"=>664},
241
+ # {"src"=>
242
+ # "https://scontent-lga3-1.cdninstagram.com/v/t51.29350-15/166780469_489667965807274_3707647015587575071_n.jpg?stp=dst-jpg_e35_s1080x1080&efg=eyJ2ZW5jb2RlX3RhZyI6ImltYWdlX3VybGdlbi4xNDQweDEyNzYuc2RyLmYyOTM1MC5kZWZhdWx0X2ltYWdlIn0&_nc_ht=scontent-lga3-1.cdninstagram.com&_nc_cat=110&_nc_ohc=in9T9HwRz9QQ7kNvgH8bokx&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYCqUfuAbAFl8tgRP3hTj9XIv33hCOnm9y-sXLZlAM4zhQ&oe=6714A2A4&_nc_sid=d885a2",
243
+ # "config_width"=>1080,
244
+ # "config_height"=>957}],
245
+ # "is_video"=>false,
246
+ # "tracking_token"=>"eyJ2ZXJzaW9uIjo1LCJwYXlsb2FkIjp7ImlzX2FuYWx5dGljc190cmFja2VkIjp0cnVlLCJ1dWlkIjoiM2FlMTBjMzNmYmRlNDI4NThhMjAzMGU2YzVmYTQwMTcyNTQyNjAzOTMwMTc0ODQ2MDA0In0sInNpZ25hdHVyZSI6IiJ9",
247
+ # "upcoming_event"=>nil,
248
+ # "edge_media_to_tagged_user"=>{"edges"=>[]},
249
+ # "owner"=>
250
+ # {"id"=>"4303258197",
251
+ # "username"=>"petesouza",
252
+ # "is_verified"=>true,
253
+ # "profile_pic_url"=>
254
+ # "https://scontent-lga3-2.cdninstagram.com/v/t51.2885-19/433045134_436644512119229_523706897615373693_n.jpg?stp=dst-jpg_s150x150&_nc_ht=scontent-lga3-2.cdninstagram.com&_nc_cat=1&_nc_ohc=N0A8l8Th9soQ7kNvgHfiXc8&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYBoRo6FOu3wh6zZic4B6u9kpJ62u-N09XfGd-BwaLwiOQ&oe=6714B524&_nc_sid=d885a2",
255
+ # "blocked_by_viewer"=>false,
256
+ # "restricted_by_viewer"=>nil,
257
+ # "followed_by_viewer"=>false,
258
+ # "full_name"=>"Pete Souza",
259
+ # "has_blocked_viewer"=>false,
260
+ # "is_embeds_disabled"=>true,
261
+ # "is_private"=>false,
262
+ # "is_unpublished"=>false,
263
+ # "requested_by_viewer"=>false,
264
+ # "pass_tiering_recommendation"=>true,
265
+ # "edge_owner_to_timeline_media"=>{"count"=>3596},
266
+ # "edge_followed_by"=>{"count"=>3166803}},
267
+ # "accessibility_caption"=>"Photo by Pete Souza on April 01, 2021.",
268
+ # "edge_sidecar_to_children"=>
269
+ # {"edges"=>
270
+ # [{"node"=>
271
+ # {"__typename"=>"XDTGraphImage",
272
+ # "id"=>"2542603927029270858",
273
+ # "shortcode"=>"CNJJMzjF8lK",
274
+ # "dimensions"=>{"height"=>957, "width"=>1080},
275
+ # "gating_info"=>nil,
276
+ # "fact_check_overall_rating"=>nil,
277
+ # "fact_check_information"=>nil,
278
+ # "sensitivity_friction_info"=>nil,
279
+ # "sharing_friction_info"=>{"should_have_sharing_friction"=>false, "bloks_app_url"=>nil},
280
+ # "media_overlay_info"=>nil,
281
+ # "media_preview"=>
282
+ # "ACol0JNYjjPKvwcZ49cetWYL5ZwSoYYOOcf0NZF1EAGOM8nI9s8/l1qxpS4jbt82PwFIZr+aPQ0eb7GmiqN/d/ZVXH8RPOM4A9vxpXGld2LzThexpROCM4PNZtjKJoQeTgkEnuc5z+vSryjgfSmIy7jBBGeuRx2puksdjA9cg/n/APXBqgYyXYk929e5/p2q1HL5QwoA4xxSuthpM2t1UNS+aLI+9nA+h6j8cd/51B9qao3uGYYPT0NK47M0ISoiXYAoKg4HHUc1aU8D6VgiZ41Chs4GOnT/ABrSilJRT6gfypoTRrYFGBRRVEhgUYFFFABgUYoooA//2Q==",
283
+ # "display_url"=>
284
+ # "https://scontent-lga3-1.cdninstagram.com/v/t51.29350-15/166780469_489667965807274_3707647015587575071_n.jpg?stp=dst-jpg_e35_s1080x1080&_nc_ht=scontent-lga3-1.cdninstagram.com&_nc_cat=110&_nc_ohc=in9T9HwRz9QQ7kNvgH8bokx&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYCqUfuAbAFl8tgRP3hTj9XIv33hCOnm9y-sXLZlAM4zhQ&oe=6714A2A4&_nc_sid=d885a2",
285
+ # "display_resources"=>
286
+ # [{"src"=>
287
+ # "https://scontent-lga3-1.cdninstagram.com/v/t51.29350-15/166780469_489667965807274_3707647015587575071_n.jpg?stp=dst-jpg_e35_s640x640_sh0.08&efg=eyJ2ZW5jb2RlX3RhZyI6ImltYWdlX3VybGdlbi4xNDQweDEyNzYuc2RyLmYyOTM1MC5kZWZhdWx0X2ltYWdlIn0&_nc_ht=scontent-lga3-1.cdninstagram.com&_nc_cat=110&_nc_ohc=in9T9HwRz9QQ7kNvgH8bokx&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYBe0iBZl_DMs37jdzJZDgLkWwIuKQKb5OtPFUIooZcORg&oe=6714A2A4&_nc_sid=d885a2",
288
+ # "config_width"=>640,
289
+ # "config_height"=>567},
290
+ # {"src"=>
291
+ # "https://scontent-lga3-1.cdninstagram.com/v/t51.29350-15/166780469_489667965807274_3707647015587575071_n.jpg?stp=dst-jpg_e35_s750x750_sh0.08&efg=eyJ2ZW5jb2RlX3RhZyI6ImltYWdlX3VybGdlbi4xNDQweDEyNzYuc2RyLmYyOTM1MC5kZWZhdWx0X2ltYWdlIn0&_nc_ht=scontent-lga3-1.cdninstagram.com&_nc_cat=110&_nc_ohc=in9T9HwRz9QQ7kNvgH8bokx&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYAM1JEf70NHUWyBKEQ3VqeZnMW4H5ypDMYCydofcR1eng&oe=6714A2A4&_nc_sid=d885a2",
292
+ # "config_width"=>750,
293
+ # "config_height"=>664},
294
+ # {"src"=>
295
+ # "https://scontent-lga3-1.cdninstagram.com/v/t51.29350-15/166780469_489667965807274_3707647015587575071_n.jpg?stp=dst-jpg_e35_s1080x1080&efg=eyJ2ZW5jb2RlX3RhZyI6ImltYWdlX3VybGdlbi4xNDQweDEyNzYuc2RyLmYyOTM1MC5kZWZhdWx0X2ltYWdlIn0&_nc_ht=scontent-lga3-1.cdninstagram.com&_nc_cat=110&_nc_ohc=in9T9HwRz9QQ7kNvgH8bokx&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYCqUfuAbAFl8tgRP3hTj9XIv33hCOnm9y-sXLZlAM4zhQ&oe=6714A2A4&_nc_sid=d885a2",
296
+ # "config_width"=>1080,
297
+ # "config_height"=>957}],
298
+ # "accessibility_caption"=>"Photo by Pete Souza on April 01, 2021.",
299
+ # "is_video"=>false,
300
+ # "tracking_token"=>"eyJ2ZXJzaW9uIjo1LCJwYXlsb2FkIjp7ImlzX2FuYWx5dGljc190cmFja2VkIjp0cnVlLCJ1dWlkIjoiM2FlMTBjMzNmYmRlNDI4NThhMjAzMGU2YzVmYTQwMTcyNTQyNjAzOTI3MDI5MjcwODU4In0sInNpZ25hdHVyZSI6IiJ9",
301
+ # "upcoming_event"=>nil,
302
+ # "edge_media_to_tagged_user"=>{"edges"=>[]}}},
303
+ # {"node"=>
304
+ # {"__typename"=>"XDTGraphImage",
305
+ # "id"=>"2542603927129914635",
306
+ # "shortcode"=>"CNJJMzpF30L",
307
+ # "dimensions"=>{"height"=>957, "width"=>1080},
308
+ # "gating_info"=>nil,
309
+ # "fact_check_overall_rating"=>nil,
310
+ # "fact_check_information"=>nil,
311
+ # "sensitivity_friction_info"=>nil,
312
+ # "sharing_friction_info"=>{"should_have_sharing_friction"=>false, "bloks_app_url"=>nil},
313
+ # "media_overlay_info"=>nil,
314
+ # "media_preview"=>
315
+ # "AColttq7glfLHBI+91wfp3pn9sv/AM8x/wB9H/4muelkKyNgsPmbv7mgTsP4j+IoGdCNb9YyP+BZ/pTv7YP9zHpyf6A1z32huhK/iCKf9p9l/A4oA3f7ZPTav4sR/wCy1cS+LKGwOQD1Pf8ACuY+0+qg/wDAhW1DKDGpx/CO49KAMeSByzHcANxIyPc0wwSjoVI+lWJDJvbBAG49vf603Mnt6/560ubzHoQ/Z36ELz6f0qP7I4OeCKuDf7f57UEtx0BPoT17fh60XGrFTymPIjBH1rchjPlr8mPlHf2rPTePlAHH15/pWvETsXIH3R29qLg7dDRNrCeSi8+wo+yQ/wBxfyFFFFiBRaxDoi/kKX7PF/dX8qKKLDuw+zxf3V/KnCJBwAPyooosF2f/2Q==",
316
+ # "display_url"=>
317
+ # "https://scontent-lga3-1.cdninstagram.com/v/t51.29350-15/166983923_403161454346738_6155203822724328628_n.jpg?stp=dst-jpg_e35_s1080x1080&_nc_ht=scontent-lga3-1.cdninstagram.com&_nc_cat=102&_nc_ohc=nR5aLOxg9rsQ7kNvgHn_rfh&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYAva-GMEQpCXN9L_uSAud5eaV50pfF6PeXY54PcA5SB1Q&oe=6714B630&_nc_sid=d885a2",
318
+ # "display_resources"=>
319
+ # [{"src"=>
320
+ # "https://scontent-lga3-1.cdninstagram.com/v/t51.29350-15/166983923_403161454346738_6155203822724328628_n.jpg?stp=dst-jpg_e35_s640x640_sh0.08&efg=eyJ2ZW5jb2RlX3RhZyI6ImltYWdlX3VybGdlbi4xNDQweDEyNzcuc2RyLmYyOTM1MC5kZWZhdWx0X2ltYWdlIn0&_nc_ht=scontent-lga3-1.cdninstagram.com&_nc_cat=102&_nc_ohc=nR5aLOxg9rsQ7kNvgHn_rfh&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYA7id0eta-jnD8lpbi5vSTI5L8_kbtiGVSSKuHOHX1dIw&oe=6714B630&_nc_sid=d885a2",
321
+ # "config_width"=>640,
322
+ # "config_height"=>567},
323
+ # {"src"=>
324
+ # "https://scontent-lga3-1.cdninstagram.com/v/t51.29350-15/166983923_403161454346738_6155203822724328628_n.jpg?stp=dst-jpg_e35_s750x750_sh0.08&efg=eyJ2ZW5jb2RlX3RhZyI6ImltYWdlX3VybGdlbi4xNDQweDEyNzcuc2RyLmYyOTM1MC5kZWZhdWx0X2ltYWdlIn0&_nc_ht=scontent-lga3-1.cdninstagram.com&_nc_cat=102&_nc_ohc=nR5aLOxg9rsQ7kNvgHn_rfh&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYA8QEZhXJQlyrEyLJU4czL1D0efUQnksn9B0PsIdhCYsA&oe=6714B630&_nc_sid=d885a2",
325
+ # "config_width"=>750,
326
+ # "config_height"=>665},
327
+ # {"src"=>
328
+ # "https://scontent-lga3-1.cdninstagram.com/v/t51.29350-15/166983923_403161454346738_6155203822724328628_n.jpg?stp=dst-jpg_e35_s1080x1080&efg=eyJ2ZW5jb2RlX3RhZyI6ImltYWdlX3VybGdlbi4xNDQweDEyNzcuc2RyLmYyOTM1MC5kZWZhdWx0X2ltYWdlIn0&_nc_ht=scontent-lga3-1.cdninstagram.com&_nc_cat=102&_nc_ohc=nR5aLOxg9rsQ7kNvgHn_rfh&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYAva-GMEQpCXN9L_uSAud5eaV50pfF6PeXY54PcA5SB1Q&oe=6714B630&_nc_sid=d885a2",
329
+ # "config_width"=>1080,
330
+ # "config_height"=>957}],
331
+ # "accessibility_caption"=>"Photo by Pete Souza on April 01, 2021.",
332
+ # "is_video"=>false,
333
+ # "tracking_token"=>"eyJ2ZXJzaW9uIjo1LCJwYXlsb2FkIjp7ImlzX2FuYWx5dGljc190cmFja2VkIjp0cnVlLCJ1dWlkIjoiM2FlMTBjMzNmYmRlNDI4NThhMjAzMGU2YzVmYTQwMTcyNTQyNjAzOTI3MTI5OTE0NjM1In0sInNpZ25hdHVyZSI6IiJ9",
334
+ # "upcoming_event"=>nil,
335
+ # "edge_media_to_tagged_user"=>{"edges"=>[]}}},
336
+ # {"node"=>
337
+ # {"__typename"=>"XDTGraphImage",
338
+ # "id"=>"2542603927012387686",
339
+ # "shortcode"=>"CNJJMziFitm",
340
+ # "dimensions"=>{"height"=>957, "width"=>1080},
341
+ # "gating_info"=>nil,
342
+ # "fact_check_overall_rating"=>nil,
343
+ # "fact_check_information"=>nil,
344
+ # "sensitivity_friction_info"=>nil,
345
+ # "sharing_friction_info"=>{"should_have_sharing_friction"=>false, "bloks_app_url"=>nil},
346
+ # "media_overlay_info"=>nil,
347
+ # "media_preview"=>
348
+ # "ACol3DdqDjB/Sk+2L6H9Ko7gxJHPJ/nSGteVEXLpvV9D+lJ9vX0P6f41kyzCJwrfdccH0I9fY/pRNIIkL9fT09qVl9w9dPM1P7QT+636f41Mt0GAODzz2rERhIoYdx29e9aMY+UfQfyoaQXZz5YCQmM4IY9D7n+E/wBKspesvDjd7jg/kcVkyuPMYf7R7+59ac1wSSRwMAAew/n9ai9itOptSSwTDa5468gjH0Pr+lU12RBlP71c8ZOP8896h875Vx8znOQRxgdDwM80nzqpyu9V646jPP8An070pO/qb0rRfvP3bfK/yJkulEgVMhO4Pb/9VdFGuVGPQfyrkFcOx2jBAJyT2FbkDt5a8/wj19KE7aBNKWqd3tfuuh0Hlr6D8hR5aeg/IUUUGAbFHOB+VLtHoKKKAE2L6D8qXaPQUUUAf//Z",
349
+ # "display_url"=>
350
+ # "https://scontent-lga3-1.cdninstagram.com/v/t51.29350-15/167407336_935009640601058_3247081289383970897_n.jpg?stp=dst-jpg_e35_s1080x1080&_nc_ht=scontent-lga3-1.cdninstagram.com&_nc_cat=102&_nc_ohc=l64ElxigC_QQ7kNvgGYnpsr&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYAUFYVdwSJDrDApXtZ4eYmOl4q4F_CuzJ9ZOn3rsib04Q&oe=6714D767&_nc_sid=d885a2",
351
+ # "display_resources"=>
352
+ # [{"src"=>
353
+ # "https://scontent-lga3-1.cdninstagram.com/v/t51.29350-15/167407336_935009640601058_3247081289383970897_n.jpg?stp=dst-jpg_e35_s640x640_sh0.08&efg=eyJ2ZW5jb2RlX3RhZyI6ImltYWdlX3VybGdlbi4xNDQweDEyNzcuc2RyLmYyOTM1MC5kZWZhdWx0X2ltYWdlIn0&_nc_ht=scontent-lga3-1.cdninstagram.com&_nc_cat=102&_nc_ohc=l64ElxigC_QQ7kNvgGYnpsr&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYCjqRYg6KP9TbnQLPvOuNNiutNkc10aAcgL9FjOBg3XTw&oe=6714D767&_nc_sid=d885a2",
354
+ # "config_width"=>640,
355
+ # "config_height"=>567},
356
+ # {"src"=>
357
+ # "https://scontent-lga3-1.cdninstagram.com/v/t51.29350-15/167407336_935009640601058_3247081289383970897_n.jpg?stp=dst-jpg_e35_s750x750_sh0.08&efg=eyJ2ZW5jb2RlX3RhZyI6ImltYWdlX3VybGdlbi4xNDQweDEyNzcuc2RyLmYyOTM1MC5kZWZhdWx0X2ltYWdlIn0&_nc_ht=scontent-lga3-1.cdninstagram.com&_nc_cat=102&_nc_ohc=l64ElxigC_QQ7kNvgGYnpsr&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYCw025z1Dlfy5gDzdVft9TlpQWmH8FUegrkjCvG_kOYLQ&oe=6714D767&_nc_sid=d885a2",
358
+ # "config_width"=>750,
359
+ # "config_height"=>665},
360
+ # {"src"=>
361
+ # "https://scontent-lga3-1.cdninstagram.com/v/t51.29350-15/167407336_935009640601058_3247081289383970897_n.jpg?stp=dst-jpg_e35_s1080x1080&efg=eyJ2ZW5jb2RlX3RhZyI6ImltYWdlX3VybGdlbi4xNDQweDEyNzcuc2RyLmYyOTM1MC5kZWZhdWx0X2ltYWdlIn0&_nc_ht=scontent-lga3-1.cdninstagram.com&_nc_cat=102&_nc_ohc=l64ElxigC_QQ7kNvgGYnpsr&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYAUFYVdwSJDrDApXtZ4eYmOl4q4F_CuzJ9ZOn3rsib04Q&oe=6714D767&_nc_sid=d885a2",
362
+ # "config_width"=>1080,
363
+ # "config_height"=>957}],
364
+ # "accessibility_caption"=>"Photo by Pete Souza on April 01, 2021.",
365
+ # "is_video"=>false,
366
+ # "tracking_token"=>"eyJ2ZXJzaW9uIjo1LCJwYXlsb2FkIjp7ImlzX2FuYWx5dGljc190cmFja2VkIjp0cnVlLCJ1dWlkIjoiM2FlMTBjMzNmYmRlNDI4NThhMjAzMGU2YzVmYTQwMTcyNTQyNjAzOTI3MDEyMzg3Njg2In0sInNpZ25hdHVyZSI6IiJ9",
367
+ # "upcoming_event"=>nil,
368
+ # "edge_media_to_tagged_user"=>{"edges"=>[]}}}]},
369
+ # "edge_media_to_caption"=>{"edges"=>[{"node"=>{"created_at"=>"1617322030", "text"=>"Opening Day 2010.⁣\n⁣\nSorry that the two teams I follow postponed their games today. (Red Sox because of rain; Nationals because of COVID.)⁣\n⁣", "id"=>"17890677095062000"}}]},
370
+ # "can_see_insights_as_brand"=>false,
371
+ # "caption_is_edited"=>false,
372
+ # "has_ranked_comments"=>false,
373
+ # "like_and_view_counts_disabled"=>false,
374
+ # "edge_media_to_parent_comment"=>
375
+ # {"count"=>188,
376
+ # "page_info"=>{"has_next_page"=>true, "end_cursor"=>"{\"server_cursor\": \"QVFEbkpRYXd0anRYcG5VYndJVEdrNjRJUVB1U1o5T3Q0OGlkcWlkbHI4dkNERHM1SDFzTGR0OFgzbnI0aGlxc2t2ejVWbmZfQzdGWl9JbWFoMW9KSTVnTQ==\", \"is_server_cursor_inverse\": true}"},
377
+ # "edges"=>
378
+ # [{"node"=>
379
+ # {"id"=>"17924110171690039",
380
+ # "text"=>"I hope the Red Sox go into the tank this 2nd half of the season.",
381
+ # "created_at"=>1626326872,
382
+ # "did_report_as_spam"=>false,
383
+ # "owner"=>
384
+ # {"id"=>"7042379789",
385
+ # "is_verified"=>false,
386
+ # "profile_pic_url"=>
387
+ # "https://scontent-lga3-2.cdninstagram.com/v/t51.2885-19/459016393_1045219070578368_7147227732658034012_n.jpg?stp=dst-jpg_s150x150&_nc_ht=scontent-lga3-2.cdninstagram.com&_nc_cat=100&_nc_ohc=4sOwhAJlKu0Q7kNvgFOe6dv&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYBg1klj1zemtj23TGeb3v4OkLqv8-vigNP5hBK0RDq_LA&oe=6714C321&_nc_sid=d885a2",
388
+ # "username"=>"arizonacatguy"},
389
+ # "viewer_has_liked"=>false,
390
+ # "edge_liked_by"=>{"count"=>0},
391
+ # "is_restricted_pending"=>false,
392
+ # "edge_threaded_comments"=>{"count"=>0, "page_info"=>{"has_next_page"=>false, "end_cursor"=>nil}, "edges"=>[]}}},
393
+ # {"node"=>
394
+ # {"id"=>"17905180978787101",
395
+ # "text"=>"@happilyheidi_hair",
396
+ # "created_at"=>1619776092,
397
+ # "did_report_as_spam"=>false,
398
+ # "owner"=>
399
+ # {"id"=>"9148384370",
400
+ # "is_verified"=>false,
401
+ # "profile_pic_url"=>
402
+ # "https://scontent-lga3-1.cdninstagram.com/v/t51.2885-19/42995749_186549675612230_3974524660833320960_n.jpg?stp=dst-jpg_s150x150&_nc_ht=scontent-lga3-1.cdninstagram.com&_nc_cat=102&_nc_ohc=HeT6ZjQJ6ncQ7kNvgGpQzFe&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYB4Bbqc_N1ZY2PT7SpgL54zXFBNMaCTM_Irm2j8qQJZEQ&oe=6714D039&_nc_sid=d885a2",
403
+ # "username"=>"wearekramsey"},
404
+ # "viewer_has_liked"=>false,
405
+ # "edge_liked_by"=>{"count"=>0},
406
+ # "is_restricted_pending"=>false,
407
+ # "edge_threaded_comments"=>{"count"=>0, "page_info"=>{"has_next_page"=>false, "end_cursor"=>nil}, "edges"=>[]}}},
408
+ # {"node"=>
409
+ # {"id"=>"17923749277573891",
410
+ # "text"=>"Love that he is a lefty!!❤️❤️",
411
+ # "created_at"=>1618209072,
412
+ # "did_report_as_spam"=>false,
413
+ # "owner"=>
414
+ # {"id"=>"258728606",
415
+ # "is_verified"=>false,
416
+ # "profile_pic_url"=>
417
+ # "https://scontent-lga3-2.cdninstagram.com/v/t51.2885-19/197380056_677834246349545_1254933075571875966_n.jpg?stp=dst-jpg_s150x150&_nc_ht=scontent-lga3-2.cdninstagram.com&_nc_cat=105&_nc_ohc=HIU-_oXrGVQQ7kNvgF6EeKd&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYAwkQCUA1jW1DfnXtFpE7Q-tr9Mlafom6bVYPwSMbBivw&oe=6714A9F7&_nc_sid=d885a2",
418
+ # "username"=>"laura_dorfman"},
419
+ # "viewer_has_liked"=>false,
420
+ # "edge_liked_by"=>{"count"=>0},
421
+ # "is_restricted_pending"=>false,
422
+ # "edge_threaded_comments"=>{"count"=>0, "page_info"=>{"has_next_page"=>false, "end_cursor"=>nil}, "edges"=>[]}}},
423
+ # {"node"=>
424
+ # {"id"=>"17906449204808870",
425
+ # "text"=>"That lefty went the distance and will go straight to the hall.",
426
+ # "created_at"=>1617570692,
427
+ # "did_report_as_spam"=>false,
428
+ # "owner"=>
429
+ # {"id"=>"7632902282",
430
+ # "is_verified"=>false,
431
+ # "profile_pic_url"=>
432
+ # "https://scontent-lga3-1.cdninstagram.com/v/t51.2885-19/295264935_2552811661522235_8718279553542030258_n.jpg?stp=dst-jpg_s150x150&_nc_ht=scontent-lga3-1.cdninstagram.com&_nc_cat=111&_nc_ohc=aixA_nblIUAQ7kNvgHafN3T&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYAtJJCMIZ4KCDrtnJ66sd6jYvyeKkWH1egvZibB8aS9zQ&oe=6714D29A&_nc_sid=d885a2",
433
+ # "username"=>"jamesd7975"},
434
+ # "viewer_has_liked"=>false,
435
+ # "edge_liked_by"=>{"count"=>0},
436
+ # "is_restricted_pending"=>false,
437
+ # "edge_threaded_comments"=>{"count"=>0, "page_info"=>{"has_next_page"=>false, "end_cursor"=>nil}, "edges"=>[]}}},
438
+ # {"node"=>
439
+ # {"id"=>"17872167998303704",
440
+ # "text"=>"Look at that form. Some team could probably still use a good situational lefty pitcher... just saying @barackobama",
441
+ # "created_at"=>1617556697,
442
+ # "did_report_as_spam"=>false,
443
+ # "owner"=>
444
+ # {"id"=>"34924509305",
445
+ # "is_verified"=>false,
446
+ # "profile_pic_url"=>
447
+ # "https://scontent-lga3-1.cdninstagram.com/v/t51.2885-19/96731301_266892211021299_7068954585062178816_n.jpg?stp=dst-jpg_s150x150&_nc_ht=scontent-lga3-1.cdninstagram.com&_nc_cat=103&_nc_ohc=O35e0ON1HNIQ7kNvgHNstad&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYCkVPkH3XjyGKDguUZ473opbhTaCKPzC4ygXO_BreTpSw&oe=6714C76D&_nc_sid=d885a2",
448
+ # "username"=>"imaseawolf"},
449
+ # "viewer_has_liked"=>false,
450
+ # "edge_liked_by"=>{"count"=>0},
451
+ # "is_restricted_pending"=>false,
452
+ # "edge_threaded_comments"=>{"count"=>0, "page_info"=>{"has_next_page"=>false, "end_cursor"=>nil}, "edges"=>[]}}},
453
+ # {"node"=>
454
+ # {"id"=>"17886631661056960",
455
+ # "text"=>"He’s just the best",
456
+ # "created_at"=>1617493051,
457
+ # "did_report_as_spam"=>false,
458
+ # "owner"=>
459
+ # {"id"=>"20023550998",
460
+ # "is_verified"=>false,
461
+ # "profile_pic_url"=>
462
+ # "https://scontent-lga3-2.cdninstagram.com/v/t51.2885-19/128591447_196956778589124_3534405417661406210_n.jpg?stp=dst-jpg_s150x150&_nc_ht=scontent-lga3-2.cdninstagram.com&_nc_cat=100&_nc_ohc=9lAgJaFHUf8Q7kNvgFczW_W&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYC3XjGdjIATXjF7-mo4ihHiZgnWQI5J_nJHq0gSIq8kcw&oe=6714C45A&_nc_sid=d885a2",
463
+ # "username"=>"teebrunetti"},
464
+ # "viewer_has_liked"=>false,
465
+ # "edge_liked_by"=>{"count"=>0},
466
+ # "is_restricted_pending"=>false,
467
+ # "edge_threaded_comments"=>{"count"=>0, "page_info"=>{"has_next_page"=>false, "end_cursor"=>nil}, "edges"=>[]}}},
468
+ # {"node"=>
469
+ # {"id"=>"17927640088542827",
470
+ # "text"=>"😍😍😍",
471
+ # "created_at"=>1617481695,
472
+ # "did_report_as_spam"=>false,
473
+ # "owner"=>
474
+ # {"id"=>"3029469755",
475
+ # "is_verified"=>false,
476
+ # "profile_pic_url"=>
477
+ # "https://scontent-lga3-2.cdninstagram.com/v/t51.2885-19/53098740_235646934057457_5873090442651762688_n.jpg?stp=dst-jpg_s150x150&_nc_ht=scontent-lga3-2.cdninstagram.com&_nc_cat=101&_nc_ohc=b-AN4puNDQ8Q7kNvgGbhdFz&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYCG_6-DN9a-Ri-BalnNLlEpWzWv8fFpPryly3eaxuBBJw&oe=6714BE90&_nc_sid=d885a2",
478
+ # "username"=>"lu2yen"},
479
+ # "viewer_has_liked"=>false,
480
+ # "edge_liked_by"=>{"count"=>0},
481
+ # "is_restricted_pending"=>false,
482
+ # "edge_threaded_comments"=>{"count"=>0, "page_info"=>{"has_next_page"=>false, "end_cursor"=>nil}, "edges"=>[]}}},
483
+ # {"node"=>
484
+ # {"id"=>"17881824170123456",
485
+ # "text"=>"Love this guy!",
486
+ # "created_at"=>1617465947,
487
+ # "did_report_as_spam"=>false,
488
+ # "owner"=>
489
+ # {"id"=>"2195211531",
490
+ # "is_verified"=>false,
491
+ # "profile_pic_url"=>
492
+ # "https://scontent-lga3-1.cdninstagram.com/v/t51.2885-19/10268793_852764404831414_583783631_a.jpg?stp=dst-jpg_s150x150&_nc_ht=scontent-lga3-1.cdninstagram.com&_nc_cat=110&_nc_ohc=JO7MghX3sjMQ7kNvgG01D20&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYAQzDuiV_Cry8rJcBI1UD47qWAijx9c9iARdisWtjzF9g&oe=6714AE78&_nc_sid=d885a2",
493
+ # "username"=>"d.c.emanuele"},
494
+ # "viewer_has_liked"=>false,
495
+ # "edge_liked_by"=>{"count"=>1},
496
+ # "is_restricted_pending"=>false,
497
+ # "edge_threaded_comments"=>{"count"=>0, "page_info"=>{"has_next_page"=>false, "end_cursor"=>nil}, "edges"=>[]}}},
498
+ # {"node"=>
499
+ # {"id"=>"17861618138460884",
500
+ # "text"=>"Hard to outdo that guy for a long, long time.",
501
+ # "created_at"=>1617464062,
502
+ # "did_report_as_spam"=>false,
503
+ # "owner"=>
504
+ # {"id"=>"5662650501",
505
+ # "is_verified"=>false,
506
+ # "profile_pic_url"=>
507
+ # "https://scontent-lga3-2.cdninstagram.com/v/t51.2885-19/47692139_2217417935165851_4146156738007007232_n.jpg?stp=dst-jpg_s150x150&_nc_ht=scontent-lga3-2.cdninstagram.com&_nc_cat=107&_nc_ohc=iUYMrldKk8YQ7kNvgGJe-D2&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYCq6bG3I2-ZkJuVIfj4HJdp21YLDN7RUYVwBYaanBhd9A&oe=6714BF63&_nc_sid=d885a2",
508
+ # "username"=>"chrismichel7144"},
509
+ # "viewer_has_liked"=>false,
510
+ # "edge_liked_by"=>{"count"=>1},
511
+ # "is_restricted_pending"=>false,
512
+ # "edge_threaded_comments"=>{"count"=>0, "page_info"=>{"has_next_page"=>false, "end_cursor"=>nil}, "edges"=>[]}}}]},
513
+ # "edge_media_to_hoisted_comment"=>{"edges"=>[]},
514
+ # "edge_media_preview_comment"=>
515
+ # {"count"=>188,
516
+ # "edges"=>
517
+ # [{"node"=>
518
+ # {"id"=>"17905180978787101",
519
+ # "text"=>"@happilyheidi_hair",
520
+ # "created_at"=>1619776092,
521
+ # "did_report_as_spam"=>false,
522
+ # "owner"=>
523
+ # {"id"=>"9148384370",
524
+ # "is_verified"=>false,
525
+ # "profile_pic_url"=>
526
+ # "https://scontent-lga3-1.cdninstagram.com/v/t51.2885-19/42995749_186549675612230_3974524660833320960_n.jpg?stp=dst-jpg_s150x150&_nc_ht=scontent-lga3-1.cdninstagram.com&_nc_cat=102&_nc_ohc=HeT6ZjQJ6ncQ7kNvgGpQzFe&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYB4Bbqc_N1ZY2PT7SpgL54zXFBNMaCTM_Irm2j8qQJZEQ&oe=6714D039&_nc_sid=d885a2",
527
+ # "username"=>"wearekramsey"},
528
+ # "viewer_has_liked"=>false,
529
+ # "edge_liked_by"=>{"count"=>0},
530
+ # "is_restricted_pending"=>false}},
531
+ # {"node"=>
532
+ # {"id"=>"17924110171690039",
533
+ # "text"=>"I hope the Red Sox go into the tank this 2nd half of the season.",
534
+ # "created_at"=>1626326872,
535
+ # "did_report_as_spam"=>false,
536
+ # "owner"=>
537
+ # {"id"=>"7042379789",
538
+ # "is_verified"=>false,
539
+ # "profile_pic_url"=>
540
+ # "https://scontent-lga3-2.cdninstagram.com/v/t51.2885-19/459016393_1045219070578368_7147227732658034012_n.jpg?stp=dst-jpg_s150x150&_nc_ht=scontent-lga3-2.cdninstagram.com&_nc_cat=100&_nc_ohc=4sOwhAJlKu0Q7kNvgFOe6dv&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYBg1klj1zemtj23TGeb3v4OkLqv8-vigNP5hBK0RDq_LA&oe=6714C321&_nc_sid=d885a2",
541
+ # "username"=>"arizonacatguy"},
542
+ # "viewer_has_liked"=>false,
543
+ # "edge_liked_by"=>{"count"=>0},
544
+ # "is_restricted_pending"=>false}}]},
545
+ # "comments_disabled"=>false,
546
+ # "commenting_disabled_for_viewer"=>false,
547
+ # "taken_at_timestamp"=>1617322029,
548
+ # "edge_media_preview_like"=>{"count"=>41388, "edges"=>[]},
549
+ # "edge_media_to_sponsor_user"=>{"edges"=>[]},
550
+ # "is_affiliate"=>false,
551
+ # "is_paid_partnership"=>false,
552
+ # "location"=>
553
+ # {"id"=>"235453813",
554
+ # "has_public_page"=>true,
555
+ # "name"=>"Nationals Park",
556
+ # "slug"=>"nationals-park",
557
+ # "address_json"=>"{\"street_address\": \"1500 S Capitol St SE\", \"zip_code\": \"20003\", \"city_name\": \"Washington D.C.\", \"region_name\": \"\", \"country_code\": \"\", \"exact_city_match\": false, \"exact_region_match\": false, \"exact_country_match\": false}"},
558
+ # "nft_asset_info"=>nil,
559
+ # "viewer_has_liked"=>false,
560
+ # "viewer_has_saved"=>false,
561
+ # "viewer_has_saved_to_collection"=>false,
562
+ # "viewer_in_photo_of_you"=>false,
563
+ # "viewer_can_reshare"=>true,
564
+ # "is_ad"=>false,
565
+ # "edge_web_media_to_related_media"=>{"edges"=>[]},
566
+ # "coauthor_producers"=>[],
567
+ # "pinned_for_users"=>[]}}
568
+ # (ruby) graphql_object["data"].keys
569
+ # ["xdt_shortcode_media"]
570
+ # (ruby) graphql_object["data"]["xdt_shortcode_media"]
571
+ # {"__typename"=>"XDTGraphSidecar",
572
+ # "__isXDTGraphMediaInterface"=>"XDTGraphSidecar",
573
+ # "id"=>"2542603930174846004",
574
+ # "shortcode"=>"CNJJM2elXQ0",
575
+ # "thumbnail_src"=>
576
+ # "https://scontent-lga3-1.cdninstagram.com/v/t51.29350-15/166780469_489667965807274_3707647015587575071_n.jpg?stp=c82.0.1276.1276a_dst-jpg_e35_s640x640_sh0.08&_nc_ht=scontent-lga3-1.cdninstagram.com&_nc_cat=110&_nc_ohc=in9T9HwRz9QQ7kNvgH8bokx&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYBT02El_YryYIJstdVTLEA-SgPQWiSTqyPIAXfdn2sZKw&oe=6714A2A4&_nc_sid=d885a2",
577
+ # "dimensions"=>{"height"=>957, "width"=>1080},
578
+ # "gating_info"=>nil,
579
+ # "fact_check_overall_rating"=>nil,
580
+ # "fact_check_information"=>nil,
581
+ # "sensitivity_friction_info"=>nil,
582
+ # "sharing_friction_info"=>{"should_have_sharing_friction"=>false, "bloks_app_url"=>nil},
583
+ # "media_overlay_info"=>nil,
584
+ # "media_preview"=>nil,
585
+ # "display_url"=>
586
+ # "https://scontent-lga3-1.cdninstagram.com/v/t51.29350-15/166780469_489667965807274_3707647015587575071_n.jpg?stp=dst-jpg_e35_s1080x1080&_nc_ht=scontent-lga3-1.cdninstagram.com&_nc_cat=110&_nc_ohc=in9T9HwRz9QQ7kNvgH8bokx&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYCqUfuAbAFl8tgRP3hTj9XIv33hCOnm9y-sXLZlAM4zhQ&oe=6714A2A4&_nc_sid=d885a2",
587
+ # "display_resources"=>
588
+ # [{"src"=>
589
+ # "https://scontent-lga3-1.cdninstagram.com/v/t51.29350-15/166780469_489667965807274_3707647015587575071_n.jpg?stp=dst-jpg_e35_s640x640_sh0.08&efg=eyJ2ZW5jb2RlX3RhZyI6ImltYWdlX3VybGdlbi4xNDQweDEyNzYuc2RyLmYyOTM1MC5kZWZhdWx0X2ltYWdlIn0&_nc_ht=scontent-lga3-1.cdninstagram.com&_nc_cat=110&_nc_ohc=in9T9HwRz9QQ7kNvgH8bokx&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYBe0iBZl_DMs37jdzJZDgLkWwIuKQKb5OtPFUIooZcORg&oe=6714A2A4&_nc_sid=d885a2",
590
+ # "config_width"=>640,
591
+ # "config_height"=>567},
592
+ # {"src"=>
593
+ # "https://scontent-lga3-1.cdninstagram.com/v/t51.29350-15/166780469_489667965807274_3707647015587575071_n.jpg?stp=dst-jpg_e35_s750x750_sh0.08&efg=eyJ2ZW5jb2RlX3RhZyI6ImltYWdlX3VybGdlbi4xNDQweDEyNzYuc2RyLmYyOTM1MC5kZWZhdWx0X2ltYWdlIn0&_nc_ht=scontent-lga3-1.cdninstagram.com&_nc_cat=110&_nc_ohc=in9T9HwRz9QQ7kNvgH8bokx&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYAM1JEf70NHUWyBKEQ3VqeZnMW4H5ypDMYCydofcR1eng&oe=6714A2A4&_nc_sid=d885a2",
594
+ # "config_width"=>750,
595
+ # "config_height"=>664},
596
+ # {"src"=>
597
+ # "https://scontent-lga3-1.cdninstagram.com/v/t51.29350-15/166780469_489667965807274_3707647015587575071_n.jpg?stp=dst-jpg_e35_s1080x1080&efg=eyJ2ZW5jb2RlX3RhZyI6ImltYWdlX3VybGdlbi4xNDQweDEyNzYuc2RyLmYyOTM1MC5kZWZhdWx0X2ltYWdlIn0&_nc_ht=scontent-lga3-1.cdninstagram.com&_nc_cat=110&_nc_ohc=in9T9HwRz9QQ7kNvgH8bokx&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYCqUfuAbAFl8tgRP3hTj9XIv33hCOnm9y-sXLZlAM4zhQ&oe=6714A2A4&_nc_sid=d885a2",
598
+ # "config_width"=>1080,
599
+ # "config_height"=>957}],
600
+ # "is_video"=>false,
601
+ # "tracking_token"=>"eyJ2ZXJzaW9uIjo1LCJwYXlsb2FkIjp7ImlzX2FuYWx5dGljc190cmFja2VkIjp0cnVlLCJ1dWlkIjoiM2FlMTBjMzNmYmRlNDI4NThhMjAzMGU2YzVmYTQwMTcyNTQyNjAzOTMwMTc0ODQ2MDA0In0sInNpZ25hdHVyZSI6IiJ9",
602
+ # "upcoming_event"=>nil,
603
+ # "edge_media_to_tagged_user"=>{"edges"=>[]},
604
+ # "owner"=>
605
+ # {"id"=>"4303258197",
606
+ # "username"=>"petesouza",
607
+ # "is_verified"=>true,
608
+ # "profile_pic_url"=>
609
+ # "https://scontent-lga3-2.cdninstagram.com/v/t51.2885-19/433045134_436644512119229_523706897615373693_n.jpg?stp=dst-jpg_s150x150&_nc_ht=scontent-lga3-2.cdninstagram.com&_nc_cat=1&_nc_ohc=N0A8l8Th9soQ7kNvgHfiXc8&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYBoRo6FOu3wh6zZic4B6u9kpJ62u-N09XfGd-BwaLwiOQ&oe=6714B524&_nc_sid=d885a2",
610
+ # "blocked_by_viewer"=>false,
611
+ # "restricted_by_viewer"=>nil,
612
+ # "followed_by_viewer"=>false,
613
+ # "full_name"=>"Pete Souza",
614
+ # "has_blocked_viewer"=>false,
615
+ # "is_embeds_disabled"=>true,
616
+ # "is_private"=>false,
617
+ # "is_unpublished"=>false,
618
+ # "requested_by_viewer"=>false,
619
+ # "pass_tiering_recommendation"=>true,
620
+ # "edge_owner_to_timeline_media"=>{"count"=>3596},
621
+ # "edge_followed_by"=>{"count"=>3166803}},
622
+ # "accessibility_caption"=>"Photo by Pete Souza on April 01, 2021.",
623
+ # "edge_sidecar_to_children"=>
624
+ # {"edges"=>
625
+ # [{"node"=>
626
+ # {"__typename"=>"XDTGraphImage",
627
+ # "id"=>"2542603927029270858",
628
+ # "shortcode"=>"CNJJMzjF8lK",
629
+ # "dimensions"=>{"height"=>957, "width"=>1080},
630
+ # "gating_info"=>nil,
631
+ # "fact_check_overall_rating"=>nil,
632
+ # "fact_check_information"=>nil,
633
+ # "sensitivity_friction_info"=>nil,
634
+ # "sharing_friction_info"=>{"should_have_sharing_friction"=>false, "bloks_app_url"=>nil},
635
+ # "media_overlay_info"=>nil,
636
+ # "media_preview"=>
637
+ # "ACol0JNYjjPKvwcZ49cetWYL5ZwSoYYOOcf0NZF1EAGOM8nI9s8/l1qxpS4jbt82PwFIZr+aPQ0eb7GmiqN/d/ZVXH8RPOM4A9vxpXGld2LzThexpROCM4PNZtjKJoQeTgkEnuc5z+vSryjgfSmIy7jBBGeuRx2puksdjA9cg/n/APXBqgYyXYk929e5/p2q1HL5QwoA4xxSuthpM2t1UNS+aLI+9nA+h6j8cd/51B9qao3uGYYPT0NK47M0ISoiXYAoKg4HHUc1aU8D6VgiZ41Chs4GOnT/ABrSilJRT6gfypoTRrYFGBRRVEhgUYFFFABgUYoooA//2Q==",
638
+ # "display_url"=>
639
+ # "https://scontent-lga3-1.cdninstagram.com/v/t51.29350-15/166780469_489667965807274_3707647015587575071_n.jpg?stp=dst-jpg_e35_s1080x1080&_nc_ht=scontent-lga3-1.cdninstagram.com&_nc_cat=110&_nc_ohc=in9T9HwRz9QQ7kNvgH8bokx&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYCqUfuAbAFl8tgRP3hTj9XIv33hCOnm9y-sXLZlAM4zhQ&oe=6714A2A4&_nc_sid=d885a2",
640
+ # "display_resources"=>
641
+ # [{"src"=>
642
+ # "https://scontent-lga3-1.cdninstagram.com/v/t51.29350-15/166780469_489667965807274_3707647015587575071_n.jpg?stp=dst-jpg_e35_s640x640_sh0.08&efg=eyJ2ZW5jb2RlX3RhZyI6ImltYWdlX3VybGdlbi4xNDQweDEyNzYuc2RyLmYyOTM1MC5kZWZhdWx0X2ltYWdlIn0&_nc_ht=scontent-lga3-1.cdninstagram.com&_nc_cat=110&_nc_ohc=in9T9HwRz9QQ7kNvgH8bokx&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYBe0iBZl_DMs37jdzJZDgLkWwIuKQKb5OtPFUIooZcORg&oe=6714A2A4&_nc_sid=d885a2",
643
+ # "config_width"=>640,
644
+ # "config_height"=>567},
645
+ # {"src"=>
646
+ # "https://scontent-lga3-1.cdninstagram.com/v/t51.29350-15/166780469_489667965807274_3707647015587575071_n.jpg?stp=dst-jpg_e35_s750x750_sh0.08&efg=eyJ2ZW5jb2RlX3RhZyI6ImltYWdlX3VybGdlbi4xNDQweDEyNzYuc2RyLmYyOTM1MC5kZWZhdWx0X2ltYWdlIn0&_nc_ht=scontent-lga3-1.cdninstagram.com&_nc_cat=110&_nc_ohc=in9T9HwRz9QQ7kNvgH8bokx&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYAM1JEf70NHUWyBKEQ3VqeZnMW4H5ypDMYCydofcR1eng&oe=6714A2A4&_nc_sid=d885a2",
647
+ # "config_width"=>750,
648
+ # "config_height"=>664},
649
+ # {"src"=>
650
+ # "https://scontent-lga3-1.cdninstagram.com/v/t51.29350-15/166780469_489667965807274_3707647015587575071_n.jpg?stp=dst-jpg_e35_s1080x1080&efg=eyJ2ZW5jb2RlX3RhZyI6ImltYWdlX3VybGdlbi4xNDQweDEyNzYuc2RyLmYyOTM1MC5kZWZhdWx0X2ltYWdlIn0&_nc_ht=scontent-lga3-1.cdninstagram.com&_nc_cat=110&_nc_ohc=in9T9HwRz9QQ7kNvgH8bokx&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYCqUfuAbAFl8tgRP3hTj9XIv33hCOnm9y-sXLZlAM4zhQ&oe=6714A2A4&_nc_sid=d885a2",
651
+ # "config_width"=>1080,
652
+ # "config_height"=>957}],
653
+ # "accessibility_caption"=>"Photo by Pete Souza on April 01, 2021.",
654
+ # "is_video"=>false,
655
+ # "tracking_token"=>"eyJ2ZXJzaW9uIjo1LCJwYXlsb2FkIjp7ImlzX2FuYWx5dGljc190cmFja2VkIjp0cnVlLCJ1dWlkIjoiM2FlMTBjMzNmYmRlNDI4NThhMjAzMGU2YzVmYTQwMTcyNTQyNjAzOTI3MDI5MjcwODU4In0sInNpZ25hdHVyZSI6IiJ9",
656
+ # "upcoming_event"=>nil,
657
+ # "edge_media_to_tagged_user"=>{"edges"=>[]}}},
658
+ # {"node"=>
659
+ # {"__typename"=>"XDTGraphImage",
660
+ # "id"=>"2542603927129914635",
661
+ # "shortcode"=>"CNJJMzpF30L",
662
+ # "dimensions"=>{"height"=>957, "width"=>1080},
663
+ # "gating_info"=>nil,
664
+ # "fact_check_overall_rating"=>nil,
665
+ # "fact_check_information"=>nil,
666
+ # "sensitivity_friction_info"=>nil,
667
+ # "sharing_friction_info"=>{"should_have_sharing_friction"=>false, "bloks_app_url"=>nil},
668
+ # "media_overlay_info"=>nil,
669
+ # "media_preview"=>
670
+ # "AColttq7glfLHBI+91wfp3pn9sv/AM8x/wB9H/4muelkKyNgsPmbv7mgTsP4j+IoGdCNb9YyP+BZ/pTv7YP9zHpyf6A1z32huhK/iCKf9p9l/A4oA3f7ZPTav4sR/wCy1cS+LKGwOQD1Pf8ACuY+0+qg/wDAhW1DKDGpx/CO49KAMeSByzHcANxIyPc0wwSjoVI+lWJDJvbBAG49vf603Mnt6/560ubzHoQ/Z36ELz6f0qP7I4OeCKuDf7f57UEtx0BPoT17fh60XGrFTymPIjBH1rchjPlr8mPlHf2rPTePlAHH15/pWvETsXIH3R29qLg7dDRNrCeSi8+wo+yQ/wBxfyFFFFiBRaxDoi/kKX7PF/dX8qKKLDuw+zxf3V/KnCJBwAPyooosF2f/2Q==",
671
+ # "display_url"=>
672
+ # "https://scontent-lga3-1.cdninstagram.com/v/t51.29350-15/166983923_403161454346738_6155203822724328628_n.jpg?stp=dst-jpg_e35_s1080x1080&_nc_ht=scontent-lga3-1.cdninstagram.com&_nc_cat=102&_nc_ohc=nR5aLOxg9rsQ7kNvgHn_rfh&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYAva-GMEQpCXN9L_uSAud5eaV50pfF6PeXY54PcA5SB1Q&oe=6714B630&_nc_sid=d885a2",
673
+ # "display_resources"=>
674
+ # [{"src"=>
675
+ # "https://scontent-lga3-1.cdninstagram.com/v/t51.29350-15/166983923_403161454346738_6155203822724328628_n.jpg?stp=dst-jpg_e35_s640x640_sh0.08&efg=eyJ2ZW5jb2RlX3RhZyI6ImltYWdlX3VybGdlbi4xNDQweDEyNzcuc2RyLmYyOTM1MC5kZWZhdWx0X2ltYWdlIn0&_nc_ht=scontent-lga3-1.cdninstagram.com&_nc_cat=102&_nc_ohc=nR5aLOxg9rsQ7kNvgHn_rfh&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYA7id0eta-jnD8lpbi5vSTI5L8_kbtiGVSSKuHOHX1dIw&oe=6714B630&_nc_sid=d885a2",
676
+ # "config_width"=>640,
677
+ # "config_height"=>567},
678
+ # {"src"=>
679
+ # "https://scontent-lga3-1.cdninstagram.com/v/t51.29350-15/166983923_403161454346738_6155203822724328628_n.jpg?stp=dst-jpg_e35_s750x750_sh0.08&efg=eyJ2ZW5jb2RlX3RhZyI6ImltYWdlX3VybGdlbi4xNDQweDEyNzcuc2RyLmYyOTM1MC5kZWZhdWx0X2ltYWdlIn0&_nc_ht=scontent-lga3-1.cdninstagram.com&_nc_cat=102&_nc_ohc=nR5aLOxg9rsQ7kNvgHn_rfh&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYA8QEZhXJQlyrEyLJU4czL1D0efUQnksn9B0PsIdhCYsA&oe=6714B630&_nc_sid=d885a2",
680
+ # "config_width"=>750,
681
+ # "config_height"=>665},
682
+ # {"src"=>
683
+ # "https://scontent-lga3-1.cdninstagram.com/v/t51.29350-15/166983923_403161454346738_6155203822724328628_n.jpg?stp=dst-jpg_e35_s1080x1080&efg=eyJ2ZW5jb2RlX3RhZyI6ImltYWdlX3VybGdlbi4xNDQweDEyNzcuc2RyLmYyOTM1MC5kZWZhdWx0X2ltYWdlIn0&_nc_ht=scontent-lga3-1.cdninstagram.com&_nc_cat=102&_nc_ohc=nR5aLOxg9rsQ7kNvgHn_rfh&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYAva-GMEQpCXN9L_uSAud5eaV50pfF6PeXY54PcA5SB1Q&oe=6714B630&_nc_sid=d885a2",
684
+ # "config_width"=>1080,
685
+ # "config_height"=>957}],
686
+ # "accessibility_caption"=>"Photo by Pete Souza on April 01, 2021.",
687
+ # "is_video"=>false,
688
+ # "tracking_token"=>"eyJ2ZXJzaW9uIjo1LCJwYXlsb2FkIjp7ImlzX2FuYWx5dGljc190cmFja2VkIjp0cnVlLCJ1dWlkIjoiM2FlMTBjMzNmYmRlNDI4NThhMjAzMGU2YzVmYTQwMTcyNTQyNjAzOTI3MTI5OTE0NjM1In0sInNpZ25hdHVyZSI6IiJ9",
689
+ # "upcoming_event"=>nil,
690
+ # "edge_media_to_tagged_user"=>{"edges"=>[]}}},
691
+ # {"node"=>
692
+ # {"__typename"=>"XDTGraphImage",
693
+ # "id"=>"2542603927012387686",
694
+ # "shortcode"=>"CNJJMziFitm",
695
+ # "dimensions"=>{"height"=>957, "width"=>1080},
696
+ # "gating_info"=>nil,
697
+ # "fact_check_overall_rating"=>nil,
698
+ # "fact_check_information"=>nil,
699
+ # "sensitivity_friction_info"=>nil,
700
+ # "sharing_friction_info"=>{"should_have_sharing_friction"=>false, "bloks_app_url"=>nil},
701
+ # "media_overlay_info"=>nil,
702
+ # "media_preview"=>
703
+ # "ACol3DdqDjB/Sk+2L6H9Ko7gxJHPJ/nSGteVEXLpvV9D+lJ9vX0P6f41kyzCJwrfdccH0I9fY/pRNIIkL9fT09qVl9w9dPM1P7QT+636f41Mt0GAODzz2rERhIoYdx29e9aMY+UfQfyoaQXZz5YCQmM4IY9D7n+E/wBKspesvDjd7jg/kcVkyuPMYf7R7+59ac1wSSRwMAAew/n9ai9itOptSSwTDa5468gjH0Pr+lU12RBlP71c8ZOP8896h875Vx8znOQRxgdDwM80nzqpyu9V646jPP8An070pO/qb0rRfvP3bfK/yJkulEgVMhO4Pb/9VdFGuVGPQfyrkFcOx2jBAJyT2FbkDt5a8/wj19KE7aBNKWqd3tfuuh0Hlr6D8hR5aeg/IUUUGAbFHOB+VLtHoKKKAE2L6D8qXaPQUUUAf//Z",
704
+ # "display_url"=>
705
+ # "https://scontent-lga3-1.cdninstagram.com/v/t51.29350-15/167407336_935009640601058_3247081289383970897_n.jpg?stp=dst-jpg_e35_s1080x1080&_nc_ht=scontent-lga3-1.cdninstagram.com&_nc_cat=102&_nc_ohc=l64ElxigC_QQ7kNvgGYnpsr&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYAUFYVdwSJDrDApXtZ4eYmOl4q4F_CuzJ9ZOn3rsib04Q&oe=6714D767&_nc_sid=d885a2",
706
+ # "display_resources"=>
707
+ # [{"src"=>
708
+ # "https://scontent-lga3-1.cdninstagram.com/v/t51.29350-15/167407336_935009640601058_3247081289383970897_n.jpg?stp=dst-jpg_e35_s640x640_sh0.08&efg=eyJ2ZW5jb2RlX3RhZyI6ImltYWdlX3VybGdlbi4xNDQweDEyNzcuc2RyLmYyOTM1MC5kZWZhdWx0X2ltYWdlIn0&_nc_ht=scontent-lga3-1.cdninstagram.com&_nc_cat=102&_nc_ohc=l64ElxigC_QQ7kNvgGYnpsr&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYCjqRYg6KP9TbnQLPvOuNNiutNkc10aAcgL9FjOBg3XTw&oe=6714D767&_nc_sid=d885a2",
709
+ # "config_width"=>640,
710
+ # "config_height"=>567},
711
+ # {"src"=>
712
+ # "https://scontent-lga3-1.cdninstagram.com/v/t51.29350-15/167407336_935009640601058_3247081289383970897_n.jpg?stp=dst-jpg_e35_s750x750_sh0.08&efg=eyJ2ZW5jb2RlX3RhZyI6ImltYWdlX3VybGdlbi4xNDQweDEyNzcuc2RyLmYyOTM1MC5kZWZhdWx0X2ltYWdlIn0&_nc_ht=scontent-lga3-1.cdninstagram.com&_nc_cat=102&_nc_ohc=l64ElxigC_QQ7kNvgGYnpsr&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYCw025z1Dlfy5gDzdVft9TlpQWmH8FUegrkjCvG_kOYLQ&oe=6714D767&_nc_sid=d885a2",
713
+ # "config_width"=>750,
714
+ # "config_height"=>665},
715
+ # {"src"=>
716
+ # "https://scontent-lga3-1.cdninstagram.com/v/t51.29350-15/167407336_935009640601058_3247081289383970897_n.jpg?stp=dst-jpg_e35_s1080x1080&efg=eyJ2ZW5jb2RlX3RhZyI6ImltYWdlX3VybGdlbi4xNDQweDEyNzcuc2RyLmYyOTM1MC5kZWZhdWx0X2ltYWdlIn0&_nc_ht=scontent-lga3-1.cdninstagram.com&_nc_cat=102&_nc_ohc=l64ElxigC_QQ7kNvgGYnpsr&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYAUFYVdwSJDrDApXtZ4eYmOl4q4F_CuzJ9ZOn3rsib04Q&oe=6714D767&_nc_sid=d885a2",
717
+ # "config_width"=>1080,
718
+ # "config_height"=>957}],
719
+ # "accessibility_caption"=>"Photo by Pete Souza on April 01, 2021.",
720
+ # "is_video"=>false,
721
+ # "tracking_token"=>"eyJ2ZXJzaW9uIjo1LCJwYXlsb2FkIjp7ImlzX2FuYWx5dGljc190cmFja2VkIjp0cnVlLCJ1dWlkIjoiM2FlMTBjMzNmYmRlNDI4NThhMjAzMGU2YzVmYTQwMTcyNTQyNjAzOTI3MDEyMzg3Njg2In0sInNpZ25hdHVyZSI6IiJ9",
722
+ # "upcoming_event"=>nil,
723
+ # "edge_media_to_tagged_user"=>{"edges"=>[]}}}]},
724
+ # "edge_media_to_caption"=>{"edges"=>[{"node"=>{"created_at"=>"1617322030", "text"=>"Opening Day 2010.⁣\n⁣\nSorry that the two teams I follow postponed their games today. (Red Sox because of rain; Nationals because of COVID.)⁣\n⁣", "id"=>"17890677095062000"}}]},
725
+ # "can_see_insights_as_brand"=>false,
726
+ # "caption_is_edited"=>false,
727
+ # "has_ranked_comments"=>false,
728
+ # "like_and_view_counts_disabled"=>false,
729
+ # "edge_media_to_parent_comment"=>
730
+ # {"count"=>188,
731
+ # "page_info"=>{"has_next_page"=>true, "end_cursor"=>"{\"server_cursor\": \"QVFEbkpRYXd0anRYcG5VYndJVEdrNjRJUVB1U1o5T3Q0OGlkcWlkbHI4dkNERHM1SDFzTGR0OFgzbnI0aGlxc2t2ejVWbmZfQzdGWl9JbWFoMW9KSTVnTQ==\", \"is_server_cursor_inverse\": true}"},
732
+ # "edges"=>
733
+ # [{"node"=>
734
+ # {"id"=>"17924110171690039",
735
+ # "text"=>"I hope the Red Sox go into the tank this 2nd half of the season.",
736
+ # "created_at"=>1626326872,
737
+ # "did_report_as_spam"=>false,
738
+ # "owner"=>
739
+ # {"id"=>"7042379789",
740
+ # "is_verified"=>false,
741
+ # "profile_pic_url"=>
742
+ # "https://scontent-lga3-2.cdninstagram.com/v/t51.2885-19/459016393_1045219070578368_7147227732658034012_n.jpg?stp=dst-jpg_s150x150&_nc_ht=scontent-lga3-2.cdninstagram.com&_nc_cat=100&_nc_ohc=4sOwhAJlKu0Q7kNvgFOe6dv&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYBg1klj1zemtj23TGeb3v4OkLqv8-vigNP5hBK0RDq_LA&oe=6714C321&_nc_sid=d885a2",
743
+ # "username"=>"arizonacatguy"},
744
+ # "viewer_has_liked"=>false,
745
+ # "edge_liked_by"=>{"count"=>0},
746
+ # "is_restricted_pending"=>false,
747
+ # "edge_threaded_comments"=>{"count"=>0, "page_info"=>{"has_next_page"=>false, "end_cursor"=>nil}, "edges"=>[]}}},
748
+ # {"node"=>
749
+ # {"id"=>"17905180978787101",
750
+ # "text"=>"@happilyheidi_hair",
751
+ # "created_at"=>1619776092,
752
+ # "did_report_as_spam"=>false,
753
+ # "owner"=>
754
+ # {"id"=>"9148384370",
755
+ # "is_verified"=>false,
756
+ # "profile_pic_url"=>
757
+ # "https://scontent-lga3-1.cdninstagram.com/v/t51.2885-19/42995749_186549675612230_3974524660833320960_n.jpg?stp=dst-jpg_s150x150&_nc_ht=scontent-lga3-1.cdninstagram.com&_nc_cat=102&_nc_ohc=HeT6ZjQJ6ncQ7kNvgGpQzFe&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYB4Bbqc_N1ZY2PT7SpgL54zXFBNMaCTM_Irm2j8qQJZEQ&oe=6714D039&_nc_sid=d885a2",
758
+ # "username"=>"wearekramsey"},
759
+ # "viewer_has_liked"=>false,
760
+ # "edge_liked_by"=>{"count"=>0},
761
+ # "is_restricted_pending"=>false,
762
+ # "edge_threaded_comments"=>{"count"=>0, "page_info"=>{"has_next_page"=>false, "end_cursor"=>nil}, "edges"=>[]}}},
763
+ # {"node"=>
764
+ # {"id"=>"17923749277573891",
765
+ # "text"=>"Love that he is a lefty!!❤️❤️",
766
+ # "created_at"=>1618209072,
767
+ # "did_report_as_spam"=>false,
768
+ # "owner"=>
769
+ # {"id"=>"258728606",
770
+ # "is_verified"=>false,
771
+ # "profile_pic_url"=>
772
+ # "https://scontent-lga3-2.cdninstagram.com/v/t51.2885-19/197380056_677834246349545_1254933075571875966_n.jpg?stp=dst-jpg_s150x150&_nc_ht=scontent-lga3-2.cdninstagram.com&_nc_cat=105&_nc_ohc=HIU-_oXrGVQQ7kNvgF6EeKd&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYAwkQCUA1jW1DfnXtFpE7Q-tr9Mlafom6bVYPwSMbBivw&oe=6714A9F7&_nc_sid=d885a2",
773
+ # "username"=>"laura_dorfman"},
774
+ # "viewer_has_liked"=>false,
775
+ # "edge_liked_by"=>{"count"=>0},
776
+ # "is_restricted_pending"=>false,
777
+ # "edge_threaded_comments"=>{"count"=>0, "page_info"=>{"has_next_page"=>false, "end_cursor"=>nil}, "edges"=>[]}}},
778
+ # {"node"=>
779
+ # {"id"=>"17906449204808870",
780
+ # "text"=>"That lefty went the distance and will go straight to the hall.",
781
+ # "created_at"=>1617570692,
782
+ # "did_report_as_spam"=>false,
783
+ # "owner"=>
784
+ # {"id"=>"7632902282",
785
+ # "is_verified"=>false,
786
+ # "profile_pic_url"=>
787
+ # "https://scontent-lga3-1.cdninstagram.com/v/t51.2885-19/295264935_2552811661522235_8718279553542030258_n.jpg?stp=dst-jpg_s150x150&_nc_ht=scontent-lga3-1.cdninstagram.com&_nc_cat=111&_nc_ohc=aixA_nblIUAQ7kNvgHafN3T&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYAtJJCMIZ4KCDrtnJ66sd6jYvyeKkWH1egvZibB8aS9zQ&oe=6714D29A&_nc_sid=d885a2",
788
+ # "username"=>"jamesd7975"},
789
+ # "viewer_has_liked"=>false,
790
+ # "edge_liked_by"=>{"count"=>0},
791
+ # "is_restricted_pending"=>false,
792
+ # "edge_threaded_comments"=>{"count"=>0, "page_info"=>{"has_next_page"=>false, "end_cursor"=>nil}, "edges"=>[]}}},
793
+ # {"node"=>
794
+ # {"id"=>"17872167998303704",
795
+ # "text"=>"Look at that form. Some team could probably still use a good situational lefty pitcher... just saying @barackobama",
796
+ # "created_at"=>1617556697,
797
+ # "did_report_as_spam"=>false,
798
+ # "owner"=>
799
+ # {"id"=>"34924509305",
800
+ # "is_verified"=>false,
801
+ # "profile_pic_url"=>
802
+ # "https://scontent-lga3-1.cdninstagram.com/v/t51.2885-19/96731301_266892211021299_7068954585062178816_n.jpg?stp=dst-jpg_s150x150&_nc_ht=scontent-lga3-1.cdninstagram.com&_nc_cat=103&_nc_ohc=O35e0ON1HNIQ7kNvgHNstad&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYCkVPkH3XjyGKDguUZ473opbhTaCKPzC4ygXO_BreTpSw&oe=6714C76D&_nc_sid=d885a2",
803
+ # "username"=>"imaseawolf"},
804
+ # "viewer_has_liked"=>false,
805
+ # "edge_liked_by"=>{"count"=>0},
806
+ # "is_restricted_pending"=>false,
807
+ # "edge_threaded_comments"=>{"count"=>0, "page_info"=>{"has_next_page"=>false, "end_cursor"=>nil}, "edges"=>[]}}},
808
+ # {"node"=>
809
+ # {"id"=>"17886631661056960",
810
+ # "text"=>"He’s just the best",
811
+ # "created_at"=>1617493051,
812
+ # "did_report_as_spam"=>false,
813
+ # "owner"=>
814
+ # {"id"=>"20023550998",
815
+ # "is_verified"=>false,
816
+ # "profile_pic_url"=>
817
+ # "https://scontent-lga3-2.cdninstagram.com/v/t51.2885-19/128591447_196956778589124_3534405417661406210_n.jpg?stp=dst-jpg_s150x150&_nc_ht=scontent-lga3-2.cdninstagram.com&_nc_cat=100&_nc_ohc=9lAgJaFHUf8Q7kNvgFczW_W&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYC3XjGdjIATXjF7-mo4ihHiZgnWQI5J_nJHq0gSIq8kcw&oe=6714C45A&_nc_sid=d885a2",
818
+ # "username"=>"teebrunetti"},
819
+ # "viewer_has_liked"=>false,
820
+ # "edge_liked_by"=>{"count"=>0},
821
+ # "is_restricted_pending"=>false,
822
+ # "edge_threaded_comments"=>{"count"=>0, "page_info"=>{"has_next_page"=>false, "end_cursor"=>nil}, "edges"=>[]}}},
823
+ # {"node"=>
824
+ # {"id"=>"17927640088542827",
825
+ # "text"=>"😍😍😍",
826
+ # "created_at"=>1617481695,
827
+ # "did_report_as_spam"=>false,
828
+ # "owner"=>
829
+ # {"id"=>"3029469755",
830
+ # "is_verified"=>false,
831
+ # "profile_pic_url"=>
832
+ # "https://scontent-lga3-2.cdninstagram.com/v/t51.2885-19/53098740_235646934057457_5873090442651762688_n.jpg?stp=dst-jpg_s150x150&_nc_ht=scontent-lga3-2.cdninstagram.com&_nc_cat=101&_nc_ohc=b-AN4puNDQ8Q7kNvgGbhdFz&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYCG_6-DN9a-Ri-BalnNLlEpWzWv8fFpPryly3eaxuBBJw&oe=6714BE90&_nc_sid=d885a2",
833
+ # "username"=>"lu2yen"},
834
+ # "viewer_has_liked"=>false,
835
+ # "edge_liked_by"=>{"count"=>0},
836
+ # "is_restricted_pending"=>false,
837
+ # "edge_threaded_comments"=>{"count"=>0, "page_info"=>{"has_next_page"=>false, "end_cursor"=>nil}, "edges"=>[]}}},
838
+ # {"node"=>
839
+ # {"id"=>"17881824170123456",
840
+ # "text"=>"Love this guy!",
841
+ # "created_at"=>1617465947,
842
+ # "did_report_as_spam"=>false,
843
+ # "owner"=>
844
+ # {"id"=>"2195211531",
845
+ # "is_verified"=>false,
846
+ # "profile_pic_url"=>
847
+ # "https://scontent-lga3-1.cdninstagram.com/v/t51.2885-19/10268793_852764404831414_583783631_a.jpg?stp=dst-jpg_s150x150&_nc_ht=scontent-lga3-1.cdninstagram.com&_nc_cat=110&_nc_ohc=JO7MghX3sjMQ7kNvgG01D20&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYAQzDuiV_Cry8rJcBI1UD47qWAijx9c9iARdisWtjzF9g&oe=6714AE78&_nc_sid=d885a2",
848
+ # "username"=>"d.c.emanuele"},
849
+ # "viewer_has_liked"=>false,
850
+ # "edge_liked_by"=>{"count"=>1},
851
+ # "is_restricted_pending"=>false,
852
+ # "edge_threaded_comments"=>{"count"=>0, "page_info"=>{"has_next_page"=>false, "end_cursor"=>nil}, "edges"=>[]}}},
853
+ # {"node"=>
854
+ # {"id"=>"17861618138460884",
855
+ # "text"=>"Hard to outdo that guy for a long, long time.",
856
+ # "created_at"=>1617464062,
857
+ # "did_report_as_spam"=>false,
858
+ # "owner"=>
859
+ # {"id"=>"5662650501",
860
+ # "is_verified"=>false,
861
+ # "profile_pic_url"=>
862
+ # "https://scontent-lga3-2.cdninstagram.com/v/t51.2885-19/47692139_2217417935165851_4146156738007007232_n.jpg?stp=dst-jpg_s150x150&_nc_ht=scontent-lga3-2.cdninstagram.com&_nc_cat=107&_nc_ohc=iUYMrldKk8YQ7kNvgGJe-D2&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYCq6bG3I2-ZkJuVIfj4HJdp21YLDN7RUYVwBYaanBhd9A&oe=6714BF63&_nc_sid=d885a2",
863
+ # "username"=>"chrismichel7144"},
864
+ # "viewer_has_liked"=>false,
865
+ # "edge_liked_by"=>{"count"=>1},
866
+ # "is_restricted_pending"=>false,
867
+ # "edge_threaded_comments"=>{"count"=>0, "page_info"=>{"has_next_page"=>false, "end_cursor"=>nil}, "edges"=>[]}}}]},
868
+ # "edge_media_to_hoisted_comment"=>{"edges"=>[]},
869
+ # "edge_media_preview_comment"=>
870
+ # {"count"=>188,
871
+ # "edges"=>
872
+ # [{"node"=>
873
+ # {"id"=>"17905180978787101",
874
+ # "text"=>"@happilyheidi_hair",
875
+ # "created_at"=>1619776092,
876
+ # "did_report_as_spam"=>false,
877
+ # "owner"=>
878
+ # {"id"=>"9148384370",
879
+ # "is_verified"=>false,
880
+ # "profile_pic_url"=>
881
+ # "https://scontent-lga3-1.cdninstagram.com/v/t51.2885-19/42995749_186549675612230_3974524660833320960_n.jpg?stp=dst-jpg_s150x150&_nc_ht=scontent-lga3-1.cdninstagram.com&_nc_cat=102&_nc_ohc=HeT6ZjQJ6ncQ7kNvgGpQzFe&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYB4Bbqc_N1ZY2PT7SpgL54zXFBNMaCTM_Irm2j8qQJZEQ&oe=6714D039&_nc_sid=d885a2",
882
+ # "username"=>"wearekramsey"},
883
+ # "viewer_has_liked"=>false,
884
+ # "edge_liked_by"=>{"count"=>0},
885
+ # "is_restricted_pending"=>false}},
886
+ # {"node"=>
887
+ # {"id"=>"17924110171690039",
888
+ # "text"=>"I hope the Red Sox go into the tank this 2nd half of the season.",
889
+ # "created_at"=>1626326872,
890
+ # "did_report_as_spam"=>false,
891
+ # "owner"=>
892
+ # {"id"=>"7042379789",
893
+ # "is_verified"=>false,
894
+ # "profile_pic_url"=>
895
+ # "https://scontent-lga3-2.cdninstagram.com/v/t51.2885-19/459016393_1045219070578368_7147227732658034012_n.jpg?stp=dst-jpg_s150x150&_nc_ht=scontent-lga3-2.cdninstagram.com&_nc_cat=100&_nc_ohc=4sOwhAJlKu0Q7kNvgFOe6dv&_nc_gid=3ae10c33fbde42858a2030e6c5fa4017&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYBg1klj1zemtj23TGeb3v4OkLqv8-vigNP5hBK0RDq_LA&oe=6714C321&_nc_sid=d885a2",
896
+ # "username"=>"arizonacatguy"},
897
+ # "viewer_has_liked"=>false,
898
+ # "edge_liked_by"=>{"count"=>0},
899
+ # "is_restricted_pending"=>false}}]},
900
+ # "comments_disabled"=>false,
901
+ # "commenting_disabled_for_viewer"=>false,
902
+ # "taken_at_timestamp"=>1617322029,
903
+ # "edge_media_preview_like"=>{"count"=>41388, "edges"=>[]},
904
+ # "edge_media_to_sponsor_user"=>{"edges"=>[]},
905
+ # "is_affiliate"=>false,
906
+ # "is_paid_partnership"=>false,
907
+ # "location"=>
908
+ # {"id"=>"235453813",
909
+ # "has_public_page"=>true,
910
+ # "name"=>"Nationals Park",
911
+ # "slug"=>"nationals-park",
912
+ # "address_json"=>"{\"street_address\": \"1500 S Capitol St SE\", \"zip_code\": \"20003\", \"city_name\": \"Washington D.C.\", \"region_name\": \"\", \"country_code\": \"\", \"exact_city_match\": false, \"exact_region_match\": false, \"exact_country_match\": false}"},
913
+ # "nft_asset_info"=>nil,
914
+ # "viewer_has_liked"=>false,
915
+ # "viewer_has_saved"=>false,
916
+ # "viewer_has_saved_to_collection"=>false,
917
+ # "viewer_in_photo_of_you"=>false,
918
+ # "viewer_can_reshare"=>true,
919
+ # "is_ad"=>false,
920
+ # "edge_web_media_to_related_media"=>{"edges"=>[]},
921
+ # "coauthor_producers"=>[],
922
+ # "pinned_for_users"=>[]}
@@ -76,11 +76,6 @@ module Zorki
76
76
  continue.call(request) && next unless !post_data_include.nil? && request.post_data&.include?(post_data_include)
77
77
 
78
78
  continue.call(request) do |response|
79
- puts "***********************************************************"
80
- puts "checking request: #{request.url}"
81
- puts response.body
82
- puts "***********************************************************"
83
-
84
79
  # Check if not a CORS prefetch and finish up if not
85
80
  if !response.body&.empty? && response.body
86
81
  check_passed = true
@@ -97,23 +92,16 @@ module Zorki
97
92
  end
98
93
  end
99
94
 
100
- if check_passed == false
101
- puts "***********************************************************"
102
- puts "checking FAILED request: #{request.url}"
103
- puts response.body
104
- puts "***********************************************************"
105
- next
106
- end
107
-
95
+ next if check_passed == false
108
96
  response_body = response.body if check_passed == true
109
97
  end
110
98
  end
111
99
  rescue Selenium::WebDriver::Error::WebDriverError
112
100
  # Eat them
113
- # rescue StandardError => e
114
- # puts "***********************************************************"
115
- # puts "Error in intercept: #{e}"
116
- # puts "***********************************************************"
101
+ rescue StandardError => e
102
+ puts "***********************************************************"
103
+ puts "Error in intercept: #{e}"
104
+ puts "***********************************************************"
117
105
  end
118
106
 
119
107
  # Now that the intercept is set up, we visit the page we want
@@ -141,23 +129,8 @@ module Zorki
141
129
  parsed_element_json = nil
142
130
  begin
143
131
  element_json = Oj.load(element.text)
144
-
145
- # if element.text.include?("jokoy.komi.io")
146
- # debugger
147
- # if element_json["require"].first.last.first["__bbox"].key?("require")
148
-
149
- # element_json["require"].first.last.first["__bbox"]["require"].each do |x|
150
- # debugger if x.to_s.include?("Si mulut pelaut")
151
- # end
152
- # end
153
- # end
154
-
155
132
  parsed_element_json = element_json["require"].last.last.first["__bbox"]["require"].first.last.last["__bbox"]["result"]["data"]["xdt_api__v1__media__shortcode__web_info"]
156
133
  rescue StandardError
157
- # puts "***********************************************************"
158
- # puts "Error in parsing JSON: #{e}"
159
- # puts e.backtrace
160
- # puts "***********************************************************"
161
134
  next
162
135
  end
163
136
 
@@ -165,14 +138,12 @@ module Zorki
165
138
  end
166
139
 
167
140
  if elements&.empty?
168
- # debugger
169
141
  raise ContentUnavailableError.new("Cannot find anything", additional_data: { page_source: page.driver.browser.page_source, elements: elements })
170
142
  end
171
143
 
172
144
  return elements
173
145
  end
174
146
 
175
- # debugger if response_body.nil?
176
147
  raise ContentUnavailableError.new("Response body nil") if response_body.nil?
177
148
  Oj.load(response_body)
178
149
  ensure
@@ -22,7 +22,7 @@ module Zorki
22
22
  loop do
23
23
  print "Scraping user #{username}... (attempt #{count + 1})\n"
24
24
  begin
25
- login
25
+ # login
26
26
 
27
27
  # This is searching for a specific request, the reason it's weird is because it's uri encoded
28
28
  # graphql_script = get_content_of_subpage_from_url("https://instagram.com/#{username}/", "graphql/query", "data,user,media_count", post_data_include: "render_surface%22%3A%22PROFILE")
data/lib/zorki/user.rb CHANGED
@@ -12,6 +12,52 @@ module Zorki
12
12
  self.scrape(usernames)
13
13
  end
14
14
 
15
+ def self.from_post_data(data)
16
+ # "owner"=>
17
+ # {"id"=>"4303258197",
18
+ # "username"=>"petesouza",
19
+ # "is_verified"=>true,
20
+ # "profile_pic_url"=>
21
+ # "https://scontent-lax3-1.cdninstagram.com/v/t51.2885-19/433045134_436644512119229_523706897615373693_n.jpg?stp=dst-jpg_s150x150&_nc_ht=scontent-lax3-1.cdninstagram.com&_nc_cat=1&_nc_ohc=N0A8l8Th9soQ7kNvgH0cKQQ&_nc_gid=29538825d3464a6f9b05bad4506fc1f9&edm=ANTKIIoBAAAA&ccb=7-5&oh=00_AYCIj0oEKb48mFW3Ag4tMW3nJitOdAe91hdIrIM_1nlwEw&oe=67163EE4&_nc_sid=d885a2",
22
+ # "blocked_by_viewer"=>false,
23
+ # "restricted_by_viewer"=>nil,
24
+ # "followed_by_viewer"=>false,
25
+ # "full_name"=>"Pete Souza",
26
+ # "has_blocked_viewer"=>false,
27
+ # "is_embeds_disabled"=>true,
28
+ # "is_private"=>false,
29
+ # "is_unpublished"=>false,
30
+ # "requested_by_viewer"=>false,
31
+ # "pass_tiering_recommendation"=>true,
32
+ # "edge_owner_to_timeline_media"=>{"count"=>3596},
33
+ # "edge_followed_by"=>{"count"=>3166659}},
34
+
35
+ new_user_hash = {
36
+ name: data["full_name"],
37
+ username: data["username"],
38
+ number_of_posts: data["edge_owner_to_timeline_media"]["count"],
39
+ number_of_followers: data["edge_followed_by"]["count"],
40
+ number_of_following: nil,
41
+ verified: data["is_verified"],
42
+ profile: nil,
43
+ profile_link: "https://www.instagram.com/#{data["username"]}",
44
+ profile_image: Zorki.retrieve_media(data["profile_pic_url"]),
45
+ profile_image_url: data["profile_pic_url"]
46
+ }
47
+
48
+ # Now we try and populate the profile
49
+ begin
50
+ scraped_user_hash = Zorki::UserScraper.new.parse(data["username"])
51
+ new_user_hash[number_of_following: scraped_user_hash[:number_of_following]]
52
+ new_user_hash[profile: scraped_user_hash[:profile]]
53
+ rescue StandardError
54
+ puts "#{new_user_hash[:name]}: User created, but cannot fill in the extra data"
55
+ # If this didn't work we'll eat the error in the interest of completing successfully.
56
+ end
57
+
58
+ User.new(new_user_hash)
59
+ end
60
+
15
61
  attr_reader :name,
16
62
  :username,
17
63
  :number_of_posts,
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.1"
4
+ VERSION = "0.2.3"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zorki
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christopher Guess
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-10-15 00:00:00.000000000 Z
11
+ date: 2024-10-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara