funky 0.2.37 → 0.2.38
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/CHANGELOG.md +6 -1
- data/lib/funky/html/parser.rb +3 -2
- data/lib/funky/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: 55156075db91dbc06646339fb01df8dfe14cd8cd14d611476ba058d883b77b29
|
|
4
|
+
data.tar.gz: aeb879e16ac997bd6cc664ceb7e267c826459547dead8f13f34c874458e4ea23
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 240ac655d82add44f9314503f36ab240b0eee5de7f73b2754fe75dcdbddf730275db5731c2cce9241e5d78abf9961fcc18acd4a697872d5f88271f5bff43b78e
|
|
7
|
+
data.tar.gz: c31d744f8dedc85ddfdc2607662c7619ffc7945168cec9b9a88b37d5629d7ff16537d988ba5c81ddf14a281e5a503086153e562a3a691e6922088ff258632df3
|
data/CHANGELOG.md
CHANGED
|
@@ -6,7 +6,12 @@ For more information about changelogs, check
|
|
|
6
6
|
[Keep a Changelog](http://keepachangelog.com) and
|
|
7
7
|
[Vandamme](http://tech-angels.github.io/vandamme).
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
|
|
10
|
+
## 0.2.38 - 2019/10/07
|
|
11
|
+
|
|
12
|
+
* [BUGFIX] Fetch like count for more Facebook videos.
|
|
13
|
+
|
|
14
|
+
## 0.2.37 - 2019/07/23 (Do not use)
|
|
10
15
|
|
|
11
16
|
* [BUGFIX] Allow funky to scrape view count for more videos
|
|
12
17
|
|
data/lib/funky/html/parser.rb
CHANGED
|
@@ -22,17 +22,18 @@ module Funky
|
|
|
22
22
|
def extract_views_from(html)
|
|
23
23
|
html.match(/<div><\/div><span class="fcg">\D*([\d,.]+)/)
|
|
24
24
|
html.match(/postViewCount:"([\d,.]*?)",/) if $1.nil?
|
|
25
|
+
html.match %r{([\d,.]*?) views from this post} if $1.nil?
|
|
25
26
|
html.match /<div class=\"_1vx9\"><span>([\d,.]*?) .*?<\/span><\/div>/ if $1.nil?
|
|
26
27
|
html.match /id=\"u_0_w\">([\d,.]*?) .*?<\/span><\/div>/ if $1.nil?
|
|
27
28
|
html.match />([\d,.]*?) Views<\/span><\/div>/ if $1.nil?
|
|
28
|
-
html.match %r{([\d,.]*?) views from this post} if $1.nil?
|
|
29
29
|
matched_count $1
|
|
30
30
|
end
|
|
31
31
|
|
|
32
32
|
def extract_likes_from(html)
|
|
33
33
|
html.match(/"likecount":(\d+),"likecountreduced"/)
|
|
34
34
|
html.match(/likecount:(\d+),likecountreduced/) if $1.nil?
|
|
35
|
-
html.match(%r[{localized_name:"Like",reaction_type:"LIKE",id:"1635855486666999",key:1},reaction_count:(\d+)}])
|
|
35
|
+
html.match(%r[{localized_name:"Like",reaction_type:"LIKE",id:"1635855486666999",key:1},reaction_count:(\d+)}]) if $1.nil?
|
|
36
|
+
html.match(%r[{reaction_count:(\d+),node:{key:1,id:"1635855486666999",localized_name:"Like",reaction_type:"LIKE"}]) if $1.nil?
|
|
36
37
|
matched_count $1
|
|
37
38
|
end
|
|
38
39
|
|
data/lib/funky/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: funky
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.38
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Philip Nguyen
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-07
|
|
11
|
+
date: 2019-10-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|