forki 0.2.9 → 0.2.10

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: be729f6e73f3a233ef2337076e907a5f62abd6d82541d38cf59ac4cf97ba99ae
4
- data.tar.gz: 8cd062ac0cf5688f60fd1d2afd6718013f7bd1a5a037194ee01135f9bb890f15
3
+ metadata.gz: f761b7a50faba5ef8fc0b701031e2a06cbbed257ff1b572d466dd9c31282287d
4
+ data.tar.gz: 7e469c3f8ccdc65bb34f1e57c1c20bcce62cd8853b5136a0c50a9e4a71cf99e7
5
5
  SHA512:
6
- metadata.gz: f0f6002e321608fc472775ddeef2b476336ad2f104d7a82063c9b8d05ec15f6e795d09dfe67a9990653fb7297c9f82dc200032285143ef43a178b458801669ad
7
- data.tar.gz: a8e5a9311783f97d6acbb628025ee6d1513ebdffe1e957b80658a3bf03f8261109fc50d4c7d765b4557046fd03288ce39627cc84deab774b6ac68023aa782dc3
6
+ metadata.gz: 9d9dfc35ff002c90d4a1821a9e00cbd1b4672142f2e199a5e2417da53ef5c4b11b5fdd2c0cca93515baa79ab56c699681f8879ae80f918bd962344f3ae5053d8
7
+ data.tar.gz: bf34e313bcf938328d3d94dabe5c7dcc6a855543c75fef2a04afc006c9b642097f3ead0680d6dea0eb0b22626745c89bc271b357170da68b627d4c0fce07a5ac
@@ -41,12 +41,15 @@ class VideoSieveWatchTab < VideoSieve
41
41
  def self.sieve(graphql_objects)
42
42
  video_object = self.extractor(graphql_objects)
43
43
 
44
- # video_url = video_object["attachments"].first["media"]["browser_native_sd_url"]
45
- video_url = video_object["short_form_video_context"]["playback_video"]["browser_native_hd_url"]
46
- video_url = video_object["short_form_video_context"]["playback_video"]["browser_native_sd_url"] if video_url.nil?
44
+ video_url = video_object["attachments"]&.first.dig("media", "browser_native_sd_url")
47
45
 
48
- # video_preview_image_url = video_object["attachments"].first["media"]["preferred_thumbnail"]["image"]["uri"]
49
- video_preview_image_url = video_object["short_form_video_context"]["video"]["first_frame_thumbnail"]
46
+ video_url = video_object.dig("short_form_video_context", "playback_video", "browser_native_hd_url") if video_url.nil?
47
+ video_url = video_object.dig("short_form_video_context", "playback_video", "browser_native_sd_url") if video_url.nil?
48
+
49
+ debugger if video_url.nil?
50
+
51
+ video_preview_image_url = video_object["attachments"]&.first.dig("media", "preferred_thumbnail", "image", "uri")
52
+ video_preview_image_url = video_object["short_form_video_context"]["video"]["first_frame_thumbnail"] if video_preview_image_url.nil?
50
53
 
51
54
  if !video_object["feedback_context"].nil?
52
55
  feedback_object = video_object["feedback_context"]["feedback_target_with_context"]
data/lib/forki/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Forki
4
- VERSION = "0.2.9"
4
+ VERSION = "0.2.10"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: forki
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.9
4
+ version: 0.2.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''