funky 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +1 -1
- data/lib/funky/html/parser.rb +2 -2
- data/lib/funky/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0938e5e1f814430fbf44b3087c1604aa9fa8bff9
|
4
|
+
data.tar.gz: 2d6c7fb71baf01002ef2a94b910a6b7bd565ea29
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 317b6fdcfe61e4d3e58b7ca096ece1f5f6af23d6e7190c57860b24a3a18c4aeba85d8eb7ab1e07dd1b1a1177452fab18c6f72c06a2af371df62594323510977d
|
7
|
+
data.tar.gz: 462fa4711b764c79cfe6f76964c6a2a8b1eec1033ee236eaee9883c7e7b037884b9419315e58c643f644b1382247ea693771d7b0e965acdc584f16957295e5d9
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,10 @@ 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.5 - 2016/07/25
|
10
|
+
|
11
|
+
* [ENHANCEMENT] Allow Funky to also scrape view count that uses dot delimiters. Previously, it only scraped view count with comma delimiters.
|
12
|
+
|
9
13
|
## 0.2.4 - 2016/06/28
|
10
14
|
|
11
15
|
* [ENHANCEMENT] Change the way views are scraped from a Facebook page, by not depending the regex on the word "Views". This has the added benefit of being able to scrape the Facebook pages that are not just in English, but also in Hebrew. Potentially, it could scrape from other languages too, but that is speculation for now.
|
data/README.md
CHANGED
@@ -10,7 +10,7 @@ Funky is a Ruby library to fetch data about videos posted on Facebook, such as t
|
|
10
10
|
|
11
11
|
## How it works
|
12
12
|
|
13
|
-
Funky can get *public* Facebook video data whether the
|
13
|
+
Funky can get *public* Facebook video data whether the Graph API requires insight permission or not. For example, even though the number of shares and views are shown publicly on the web page, the Graph API will not return those results unless the user has insight permission for that video. Using Funky, you can obtain the number of shares and views without insight permissions.
|
14
14
|
|
15
15
|
Under the hood, Funky hits Facebook's APIs on some cases, while other cases it will scrape Facebook's HTML to get the data. It's kind of... funky.
|
16
16
|
|
data/lib/funky/html/parser.rb
CHANGED
@@ -17,8 +17,8 @@ module Funky
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def extract_views_from(html)
|
20
|
-
html.match(/<div><\/div><span class="fcg">\D*([
|
21
|
-
html.match %r{([\d
|
20
|
+
html.match(/<div><\/div><span class="fcg">\D*([\d,.]+)/)
|
21
|
+
html.match %r{([\d,.]*?) views from this post} if $1.nil?
|
22
22
|
matched_count $1
|
23
23
|
end
|
24
24
|
|
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.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Philip Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-07-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|