funky 0.2.3 → 0.2.4

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
  SHA1:
3
- metadata.gz: c2c8d692ebb8d05da20e458db5f845fd7b323959
4
- data.tar.gz: a145fb6b2acae26ec6c5bed374d89f9bdaf60990
3
+ metadata.gz: ac6d82bbd6aca0ce10bcb1301f5820b992c57e8e
4
+ data.tar.gz: d923336dd78754cc7c16f6678d0fe290750872e7
5
5
  SHA512:
6
- metadata.gz: d7703e5fb6fc90cb0dd601cb158a1009a615df501d72bdfdc6d17d13f52eb62d5c40684acb178b0219711853ecd74f04d4e5b51655d1e33a4a3f39401b5f0a36
7
- data.tar.gz: fa0630db3d930a4ee50cec0fba6df8fe7be443c98b735c9d73d39e884e1f6a9cc3adad59ec494196da79a228a4f14323cd36aad9c0852e13d240a0eb76f9b42a
6
+ metadata.gz: a6c9a8ab919d7eef5811afe3cf9f7f044eb6cabecf27939ed953baffdaee2f38735558a2237c85326b17461aa7451658c138da3db180ab4f94772c3f04494755
7
+ data.tar.gz: e04f978553c99cd673254ade664b9f3087bab38b7c2bafaecfaf3cdb881f75be1148912c5df21c121fa9fb1a82db121125f412128b32ca0e35f54a3fc13f8e0f
@@ -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.4 - 2016/06/28
10
+
11
+ * [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.
12
+
9
13
  ## 0.2.3 - 2016/06/22
10
14
 
11
15
  * [FEATURE] Add `page_name` of a video found by API call (which is `Funky::Video.where`)
data/README.md CHANGED
@@ -46,14 +46,6 @@ There are two ways to configure Funky with your App ID and App Secret:
46
46
  config.app_secret = 'YourAppSecret'
47
47
  end
48
48
  ```
49
- Or with environment variables (which is safer) like so:
50
-
51
- ```ruby
52
- Funky.configure do |config|
53
- config.app_id = ENV['FB_APP_ID']
54
- config.app_secret = ENV['FB_APP_SECRET']
55
- end
56
- ```
57
49
 
58
50
  ### Use #where clause to get an array of videos
59
51
 
@@ -107,7 +99,7 @@ video.share_count # => 348
107
99
  video.view_count # => 10121
108
100
  ```
109
101
 
110
- If a non-existing video url is passed into #find_by, Funky::ContentNotFound will be raised.
102
+ If a non-existing video url is passed into #find_by_url!, Funky::ContentNotFound will be raised.
111
103
 
112
104
  ```ruby
113
105
  Funky::Video.find_by_url!('https://www.facebook.com/video.php?v=doesnotexist')
@@ -17,7 +17,7 @@ module Funky
17
17
  end
18
18
 
19
19
  def extract_views_from(html)
20
- html.match(/<div><\/div><span class="fcg">(.*) Views<\/span>/)
20
+ html.match(/<div><\/div><span class="fcg">\D*([,0-9]+)/)
21
21
  html.match %r{([\d,]*?) views from this post} if $1.nil?
22
22
  matched_count $1
23
23
  end
@@ -1,3 +1,3 @@
1
1
  module Funky
2
- VERSION = "0.2.3"
2
+ VERSION = "0.2.4"
3
3
  end
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.3
4
+ version: 0.2.4
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-06-22 00:00:00.000000000 Z
11
+ date: 2016-06-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler