pointmd_comments 0.1.7 → 0.2.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fca56a444c6f4243e673339bf85174fbb71dd2a959d3ad2b52b9728fbd598dbe
|
4
|
+
data.tar.gz: 208e3c91a53f539a08cf9d6a3dec0606f25851ac576898c9caa2975c08251018
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 170db4ed751423521520ce60d48fd30c40dd8212685c07672e749c90ccea7ef8a688e58a7f7bd4880885c621188e8414e883878669c65b83e43861d861dd1a37
|
7
|
+
data.tar.gz: cd3966ec082acbcbd6484b586593ea9b8b1c08fe3cba235c8c2292ef48044454575a39bd7f171afb0930effa215c55a72d4d60dc9ea0950e4965527dd24f474c
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module PointmdComments
|
2
2
|
module Aggregators
|
3
3
|
class Main
|
4
|
-
CHROME_ARGS =
|
4
|
+
CHROME_ARGS = %w[disable-dev-shm-usage disable-software-rasterizer no-sandbox].freeze
|
5
5
|
|
6
6
|
attr_reader :posts_aggregator, :browser, :comments_aggregator, :all_comments, :posts, :source, :output, :path
|
7
7
|
|
@@ -11,7 +11,6 @@ module PointmdComments
|
|
11
11
|
def initialize(source:, path:)
|
12
12
|
@source = source
|
13
13
|
@path = path
|
14
|
-
@urls = []
|
15
14
|
end
|
16
15
|
|
17
16
|
def call
|
@@ -41,22 +40,12 @@ module PointmdComments
|
|
41
40
|
end
|
42
41
|
|
43
42
|
def fetch_news_posts
|
44
|
-
|
45
|
-
|
43
|
+
# NOTE: .post-blocks-wrap does not exist anymore
|
44
|
+
# Find <article> tags instead
|
45
|
+
articles = @page.css('article')
|
46
46
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
populate_urls(main_post, other_posts)
|
51
|
-
end
|
52
|
-
|
53
|
-
def populate_urls(main_post, other_posts)
|
54
|
-
@urls << main_post
|
55
|
-
|
56
|
-
@urls += other_posts.children.map do |child|
|
57
|
-
child.css('article').css('h2').children[1]['href']
|
58
|
-
rescue StandardError
|
59
|
-
next
|
47
|
+
@urls = articles.map do |article|
|
48
|
+
article.css('a').attribute('href').to_s
|
60
49
|
end.compact
|
61
50
|
end
|
62
51
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pointmd_comments
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nicolai Stoianov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-04-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|
@@ -120,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
120
120
|
- !ruby/object:Gem::Version
|
121
121
|
version: '0'
|
122
122
|
requirements: []
|
123
|
-
rubygems_version: 3.
|
123
|
+
rubygems_version: 3.2.3
|
124
124
|
signing_key:
|
125
125
|
specification_version: 4
|
126
126
|
summary: Point.md comments aggregator
|