forki 0.2.12 → 0.2.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/forki/scrapers/post_scraper.rb +6 -6
- data/lib/forki/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b6dad4ed40e17a940d54200b022b9ca9b2569f48abcc602e6b40eb6bdc994f19
|
4
|
+
data.tar.gz: 96495423ff46aa90a874e2969568e0eb81fe1b0aaf1df5e3e62ec9bb46738db4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '08a5288e3fd9feb8cfbe683986a6a99a1791699e8b2335693928b16de69a5a8ebdea955e84dd17967ab95fecde04164b9c8cbdfbcb7860ff34d12e417a597ec6'
|
7
|
+
data.tar.gz: 000e63e56a249cb8abca7e2ae9364e9f0f4b146d1d8063f279b135d4e9eb4593b1fe78d6d3b73e2bf89810568254aebf07aa52ea93e5a6e4d9fe0cfede1d4977
|
@@ -38,8 +38,6 @@ module Forki
|
|
38
38
|
extract_image_post_data(graphql_objects)
|
39
39
|
else
|
40
40
|
extract_image_post_data(graphql_objects)
|
41
|
-
|
42
|
-
#raise UnhandledContentError
|
43
41
|
end
|
44
42
|
end
|
45
43
|
|
@@ -324,9 +322,7 @@ module Forki
|
|
324
322
|
elsif graphql_object["node"]["comet_sections"]["feedback"]["story"].dig("feedback_context")
|
325
323
|
begin
|
326
324
|
feedback_object = graphql_object["node"]["comet_sections"]["feedback"]["story"]["feedback_context"]["feedback_target_with_context"]["ufi_renderer"]["feedback"]["comet_ufi_summary_and_actions_renderer"]["feedback"]
|
327
|
-
rescue NoMethodError
|
328
|
-
debugger
|
329
|
-
end
|
325
|
+
rescue NoMethodError; end
|
330
326
|
elsif graphql_object["node"]["comet_sections"]["feedback"]["story"].has_key?("comet_feed_ufi_container")
|
331
327
|
feedback_object = graphql_object["node"]["comet_sections"]["feedback"]["story"]["comet_feed_ufi_container"]["story"]["story_ufi_container"]["story"]["feedback_context"]["feedback_target_with_context"]["comet_ufi_summary_and_actions_renderer"]["feedback"]
|
332
328
|
else
|
@@ -353,7 +349,9 @@ module Forki
|
|
353
349
|
end
|
354
350
|
end
|
355
351
|
|
356
|
-
text = graphql_object["node"]["comet_sections"]["content"]["story"]["message"
|
352
|
+
text = graphql_object["node"]["comet_sections"]["content"]["story"].dig(["message", "text"])
|
353
|
+
text = "" if text.nil?
|
354
|
+
|
357
355
|
profile_link = graphql_object["node"]["comet_sections"]["content"]["story"]["actors"].first["url"]
|
358
356
|
|
359
357
|
unless graphql_object["node"]["comet_sections"].dig("content", "story", "comet_sections", "context_layout", "story", "comet_sections", "metadata").nil?
|
@@ -506,7 +504,9 @@ module Forki
|
|
506
504
|
end
|
507
505
|
|
508
506
|
begin
|
507
|
+
# rubocop:disable Lint/Debugger
|
509
508
|
save_screenshot("#{Forki.temp_storage_location}/facebook_screenshot_#{SecureRandom.uuid}.png")
|
509
|
+
# rubocop:enable Lint/Debugger
|
510
510
|
rescue Selenium::WebDriver::Error::TimeoutError
|
511
511
|
raise Net::ReadTimeout
|
512
512
|
end
|
data/lib/forki/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: forki
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ''
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-10-
|
11
|
+
date: 2024-10-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capybara
|