Skip to content
Permalink
Browse files

initial commit

  • Loading branch information...
ondenman committed Aug 4, 2016
0 parents commit fe1b72c4c50934117d24752ec7d6c5064ebfb7ea
Showing with 94 additions and 0 deletions.
  1. +7 −0 Gemfile
  2. +71 −0 Gemfile.lock
  3. +16 −0 scraper.rb
@@ -0,0 +1,7 @@
# frozen_string_literal: true

source "https://rubygems.org"

gem "twitter"
gem 'twitter_list', git: "https://github.com/everypolitician/twitter_list"
gem 'scraperwiki', git: 'https://github.com/openaustralia/scraperwiki-ruby', branch: 'morph_defaults'
@@ -0,0 +1,71 @@
GIT
remote: https://github.com/everypolitician/twitter_list
revision: 06ec0b4521a964674ba482dfa3efc0dc43c1a1e0
specs:
twitter_list (0.0.2)
twitter

GIT
remote: https://github.com/openaustralia/scraperwiki-ruby
revision: fc50176812505e463077d5c673d504a6a234aa78
branch: morph_defaults
specs:
scraperwiki (3.0.1)
httpclient
sqlite_magic

GEM
remote: https://rubygems.org/
specs:
addressable (2.4.0)
buftok (0.2.0)
domain_name (0.5.20160615)
unf (>= 0.0.5, < 1.0.0)
equalizer (0.0.10)
faraday (0.9.2)
multipart-post (>= 1.2, < 3)
http (1.0.4)
addressable (~> 2.3)
http-cookie (~> 1.0)
http-form_data (~> 1.0.1)
http_parser.rb (~> 0.6.0)
http-cookie (1.0.2)
domain_name (~> 0.5)
http-form_data (1.0.1)
http_parser.rb (0.6.0)
httpclient (2.8.0)
json (1.8.3)
memoizable (0.4.2)
thread_safe (~> 0.3, >= 0.3.1)
multipart-post (2.0.0)
naught (1.1.0)
simple_oauth (0.3.1)
sqlite3 (1.3.11)
sqlite_magic (0.0.6)
sqlite3
thread_safe (0.3.5)
twitter (5.16.0)
addressable (~> 2.3)
buftok (~> 0.2.0)
equalizer (= 0.0.10)
faraday (~> 0.9.0)
http (~> 1.0)
http_parser.rb (~> 0.6.0)
json (~> 1.8)
memoizable (~> 0.4.0)
naught (~> 1.0)
simple_oauth (~> 0.3.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.2)

PLATFORMS
ruby

DEPENDENCIES
scraperwiki!
twitter
twitter_list!

BUNDLED WITH
1.12.5
@@ -0,0 +1,16 @@
#!/bin/env ruby
# encoding: utf-8

require 'rubygems'
require 'bundler/setup'

require 'scraperwiki'
require 'twitter_list'

abort "Need to set ENV['MORPH_TWITTER_TOKENS']" unless ENV.key? 'MORPH_TWITTER_TOKENS'
twitter_list = TwitterList::Scraper.new(twitter_tokens: ENV['MORPH_TWITTER_TOKENS'])

twitter_list_array =
twitter_list.people('politwoops', 'ca') + twitter_list.people('cka_politwit', 'federal-mps')

ScraperWiki.save_sqlite([:id], twitter_list_array.uniq)

0 comments on commit fe1b72c

Please sign in to comment.
You can’t perform that action at this time.