funky 0.2.35 → 0.2.36
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/funky/html/parser.rb +3 -0
- 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: 798436c801870af1fea4bf6c1f23f1587a38538d144a43591b71b697933c4911
|
4
|
+
data.tar.gz: 3654e41cf3c6fc77a835942d794f7b32ecbec21a0e7c919691858aafe64b0f64
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2eee18ef3b90273753feeab023875f937ed0e428ed0816c399bf4fcfd0468b13eb3d3e201a787104976cc0b2000db1727b86ba3d5a8b4b2bf9cbebd499dce39e
|
7
|
+
data.tar.gz: b1eb3df953faa477284e6887d30b07fa7ee12f082f5c8f9ecd9cbe86ecbdb0cb206e19cf966ead716cb6efe4e32feee6579657723825ec6c08877a88b224baff
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,11 @@ 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
|
+
## 0.2.36 - 2019/03/05
|
10
|
+
|
11
|
+
* [BUGFIX] Fetch comment count, share count, like count for Facebook
|
12
|
+
videos with different HTML.
|
13
|
+
|
9
14
|
## 0.2.35 - 2019/01/14
|
10
15
|
|
11
16
|
* [ENHANCEMENT] Use 2.10 of Facebook Graph API (upgrade from 2.8).
|
data/lib/funky/html/parser.rb
CHANGED
@@ -15,6 +15,7 @@ module Funky
|
|
15
15
|
html.match(/"sharecount":(.*?),/)
|
16
16
|
html.match(/sharecount:(\d+),sharecountreduced/) if $1.nil?
|
17
17
|
html.match(/sharecount:(\d+),.*sharefbid:"#{video_id}"/) if $1.nil?
|
18
|
+
html.match(/share_count:{count:(\d+)}/) if $1.nil?
|
18
19
|
matched_count $1
|
19
20
|
end
|
20
21
|
|
@@ -29,6 +30,7 @@ module Funky
|
|
29
30
|
def extract_likes_from(html)
|
30
31
|
html.match(/"likecount":(\d+),"likecountreduced"/)
|
31
32
|
html.match(/likecount:(\d+),likecountreduced/) if $1.nil?
|
33
|
+
html.match(%r[{localized_name:"Like",reaction_type:"LIKE",id:"1635855486666999",key:1},reaction_count:(\d+)}])
|
32
34
|
matched_count $1
|
33
35
|
end
|
34
36
|
|
@@ -37,6 +39,7 @@ module Funky
|
|
37
39
|
html.match(/commentcount:(\d+),commentcountreduced/) if $1.nil?
|
38
40
|
html.match /commentcount:(\d+),commentTotalCount/ if $1.nil?
|
39
41
|
html.match /commentcount:(\d+),.*commentstargetfbid:"#{video_id}"/ if $1.nil?
|
42
|
+
html.match(/comment_count:{total_count:(\d+)}/) if $1.nil?
|
40
43
|
matched_count $1
|
41
44
|
end
|
42
45
|
|
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.36
|
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-
|
11
|
+
date: 2019-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|