fb_scrape 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/bin/fb_scrape +10 -0
- data/lib/fb_scrape/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: 8fd44361f2a83fe3e46e497c795209d4af1dd96c
|
4
|
+
data.tar.gz: 1470c97d9c2e9d9b7f45e52e2a0500abd9dccf4f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49f47daace408a63c05e8cd86c40e2dd4152e88c49c6e5efcbdfe95ca705b4d0cb5790ae4d2af7e41166cefce7e52025762856a5e4dd00bc2fde4e8adf4b036f
|
7
|
+
data.tar.gz: 9ae18b4d7ba0f2f220d8c33897bff60286766591154bdb243cc8b035dec141da2fd74213b373cb6ba34c1b9740e4f6b6c8ee3444f04c2f8e8723ace31961d610
|
data/.gitignore
CHANGED
data/bin/fb_scrape
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
require 'fb_scrape'
|
4
4
|
require 'thor'
|
5
5
|
require 'json'
|
6
|
+
require 'csv'
|
6
7
|
|
7
8
|
class FBScrape::CLI < Thor
|
8
9
|
|
@@ -79,6 +80,15 @@ class FBScrape::CLI < Thor
|
|
79
80
|
messages = client.conversations.collect{ |c| c.messages }.flatten
|
80
81
|
puts "Total messages #{messages.count}"
|
81
82
|
|
83
|
+
CSV.open(options[:out_file], "w") do |w|
|
84
|
+
w << ["message_id", "conversation_id", "from", "text", "is_reply", "created_at"]
|
85
|
+
|
86
|
+
messages.each do |m|
|
87
|
+
w << [m.id, m.conversation_id, m.from_name, m.text, m.is_reply?, m.created_at ]
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
|
82
92
|
rescue ArgumentError => e
|
83
93
|
puts e.message
|
84
94
|
end
|
data/lib/fb_scrape/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fb_scrape
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Trevor Kimenye
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-12-
|
11
|
+
date: 2017-12-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|