This is a scraper that runs on Morph. To get started see the documentation

Contributors tmtmtmtm octopusinvitro ondenman

Last run failed with status code 1.

Console output of last run

Injecting configuration and compiling...  -----> Ruby app detected -----> Compiling Ruby -----> Using Ruby version: ruby-2.3.3 -----> Installing dependencies using bundler 1.15.2  Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment  Fetching gem metadata from https://rubygems.org/.........  Fetching version metadata from https://rubygems.org/..  Fetching dependency metadata from https://rubygems.org/.  Fetching https://github.com/everypolitician/combine_popolo_memberships.git  Fetching https://github.com/everypolitician/scraped.git  Fetching https://github.com/everypolitician/scraped_page_archive.git  Fetching https://github.com/everypolitician/scraper_test.git  Fetching https://github.com/openaustralia/scraperwiki-ruby.git  Fetching https://github.com/everypolitician/table_unspanner.git  Fetching https://github.com/everypolitician/wikidata-fetcher.git  Fetching https://github.com/everypolitician/wikidata_ids_decorator.git  Fetching rake 12.0.0  Fetching public_suffix 3.0.0  Fetching ast 2.3.0  Installing ast 2.3.0  Installing rake 12.0.0  Using bundler 1.15.2  Installing public_suffix 3.0.0  Fetching coderay 1.1.2  Installing coderay 1.1.2  Fetching colorize 0.8.1  Using combine_popolo_memberships 0.2.0 from https://github.com/everypolitician/combine_popolo_memberships.git (at master@5769841)  Fetching safe_yaml 1.0.4  Fetching diskcached 1.1.3  Installing colorize 0.8.1  Installing safe_yaml 1.0.4  Fetching unf_ext 0.0.7.4  Fetching excon 0.59.0  Installing excon 0.59.0  Installing diskcached 1.1.3  Fetching execjs 2.7.0  Installing execjs 2.7.0  Fetching multipart-post 2.0.0  Fetching field_serializer 0.3.0  Installing unf_ext 0.0.7.4 with native extensions  Installing field_serializer 0.3.0  Installing multipart-post 2.0.0  Fetching git 1.3.0  Fetching hashdiff 0.3.6  Installing git 1.3.0  Installing hashdiff 0.3.6  Fetching hashie 3.5.6  Installing hashie 3.5.6  Fetching httpclient 2.8.3  Fetching json 2.1.0  Installing json 2.1.0 with native extensions  Installing httpclient 2.8.3  Fetching method_source 0.8.2  Installing method_source 0.8.2  Fetching mime-types-data 3.2016.0521  Installing mime-types-data 3.2016.0521  Fetching mini_portile2 2.2.0  Installing mini_portile2 2.2.0  Fetching minitest 5.10.3  Installing minitest 5.10.3  Fetching vcr 3.0.3  Installing vcr 3.0.3  Fetching netrc 0.11.0  Installing netrc 0.11.0  Fetching open-uri-cached 0.0.5  Installing open-uri-cached 0.0.5  Fetching parallel 1.12.0  Installing parallel 1.12.0  Fetching powerpack 0.1.1  Installing powerpack 0.1.1  Fetching slop 3.6.0  Installing slop 3.6.0  Fetching require_all 1.4.0  Installing require_all 1.4.0  Fetching ruby-progressbar 1.8.1  Installing ruby-progressbar 1.8.1  Fetching unicode-display_width 1.3.0  Installing unicode-display_width 1.3.0  Fetching sqlite3 1.3.13  Installing sqlite3 1.3.13 with native extensions  Fetching yajl-ruby 1.3.0  Installing yajl-ruby 1.3.0 with native extensions  Fetching parser 2.4.0.0  Installing parser 2.4.0.0  Fetching rainbow 2.2.2  Installing rainbow 2.2.2 with native extensions  Fetching addressable 2.5.2  Installing addressable 2.5.2  Fetching crack 0.4.3  Installing crack 0.4.3  Fetching faraday 0.13.1  Installing faraday 0.13.1  Fetching mime-types 3.1  Installing mime-types 3.1  Fetching nokogiri 1.8.0  Fetching minispec-metadata 2.0.0  Installing minispec-metadata 2.0.0  Fetching minitest-around 0.4.0  Fetching pry 0.10.4  Installing minitest-around 0.4.0  Fetching unf 0.1.4  Installing pry 0.10.4  Installing unf 0.1.4  Fetching wikisnakker 0.9.1  Fetching sqlite_magic 0.0.6  Installing wikisnakker 0.9.1  Installing sqlite_magic 0.0.6  Fetching faraday_middleware 0.12.2  Fetching webmock 2.0.3  Installing faraday_middleware 0.12.2  Installing webmock 2.0.3  Fetching minitest-vcr 1.4.0  Installing minitest-vcr 1.4.0  Fetching rubocop 0.49.1  Fetching domain_name 0.5.20170404  Installing domain_name 0.5.20170404  Using scraperwiki 3.0.1 from https://github.com/openaustralia/scraperwiki-ruby.git (at morph_defaults@fc50176)  Fetching wikidata-client 0.0.10  Installing rubocop 0.49.1  Installing nokogiri 1.8.0 with native extensions  Installing wikidata-client 0.0.10  Fetching vcr-archive 0.3.0  Installing vcr-archive 0.3.0  Using scraper_test 0.1.0 from https://github.com/everypolitician/scraper_test.git (at master@9b4326c)  Fetching http-cookie 1.0.3  Using scraped_page_archive 0.5.0 from https://github.com/everypolitician/scraped_page_archive.git (at master@3b67c31)  Installing http-cookie 1.0.3  Fetching faraday-cookie_jar 0.0.6  Fetching rest-client 2.0.2  Installing faraday-cookie_jar 0.0.6  Fetching mediawiki_api 0.7.1  Installing rest-client 2.0.2  Installing mediawiki_api 0.7.1  Using scraped 0.6.2 from https://github.com/everypolitician/scraped.git (at master@58c88c1)  Using table_unspanner 0.1.0 from https://github.com/everypolitician/table_unspanner.git (at master@a70a98a)  Using wikidata-fetcher 0.21.0 from https://github.com/everypolitician/wikidata-fetcher.git (at master@9657b9b)  Using wikidata_ids_decorator 0.1.0 from https://github.com/everypolitician/wikidata_ids_decorator.git (at master@259c620)  Bundle complete! 20 Gemfile dependencies, 65 gems now installed.  Gems in the groups development and test were not installed.  Bundled gems are installed into ./vendor/bundle.  Post-install message from webmock:  WebMock 2.0 has some breaking changes. Please check the CHANGELOG: https://goo.gl/piDGLu  Bundle completed (41.63s)  Cleaning up the bundler cache. -----> Installing node-v6.11.1-linux-x64 -----> Detecting rake tasks   -----> Discovering process types  Procfile declares types -> scraper Injecting scraper and running... /app/vendor/ruby-2.3.3/lib/ruby/2.3.0/open-uri.rb:225:in `open_loop': redirection forbidden: http://www.parliament.gov.sg/history/1st-parliament -> https://www.parliament.gov.sg/history/1st-parliament (RuntimeError) from /app/vendor/ruby-2.3.3/lib/ruby/2.3.0/open-uri.rb:151:in `open_uri' from /app/vendor/bundle/ruby/2.3.0/gems/open-uri-cached-0.0.5/lib/open-uri/cached.rb:10:in `open_uri' from /app/vendor/ruby-2.3.3/lib/ruby/2.3.0/open-uri.rb:717:in `open' from /app/vendor/ruby-2.3.3/lib/ruby/2.3.0/open-uri.rb:35:in `open' from /app/vendor/bundle/ruby/2.3.0/bundler/gems/scraped-58c88c135f96/lib/scraped/request/strategy/live_request.rb:10:in `response' from /app/vendor/bundle/ruby/2.3.0/bundler/gems/scraped-58c88c135f96/lib/scraped/request.rb:29:in `block in first_successful_response' from /app/vendor/bundle/ruby/2.3.0/bundler/gems/scraped-58c88c135f96/lib/scraped/request.rb:30:in `each' from /app/vendor/bundle/ruby/2.3.0/bundler/gems/scraped-58c88c135f96/lib/scraped/request.rb:30:in `each' from /app/vendor/bundle/ruby/2.3.0/bundler/gems/scraped-58c88c135f96/lib/scraped/request.rb:30:in `each' from /app/vendor/bundle/ruby/2.3.0/bundler/gems/scraped-58c88c135f96/lib/scraped/request.rb:30:in `each' from /app/vendor/bundle/ruby/2.3.0/bundler/gems/scraped-58c88c135f96/lib/scraped/request.rb:30:in `each' from /app/vendor/bundle/ruby/2.3.0/bundler/gems/scraped-58c88c135f96/lib/scraped/request.rb:30:in `each' from /app/vendor/bundle/ruby/2.3.0/bundler/gems/scraped-58c88c135f96/lib/scraped/request.rb:30:in `first' from /app/vendor/bundle/ruby/2.3.0/bundler/gems/scraped-58c88c135f96/lib/scraped/request.rb:30:in `first_successful_response' from /app/vendor/bundle/ruby/2.3.0/bundler/gems/scraped-58c88c135f96/lib/scraped/request.rb:13:in `response' from scraper.rb:120:in `scraper' from scraper.rb:134:in `<main>'

Data

Downloaded 1190 times by everypolitician octopusinvitro MikeRalphson davewhiteland tmtmtmtm

To download data sign in with GitHub

Download table (as CSV) Download SQLite database (278 KB) Use the API

rows 10 / 13

id name source start_date end_date
1
1st Parliament
1965-12-08
1968-02-08
2
2nd Parliament
1968-05-06
1972-08-16
3
3rd Parliament
1972-10-12
1976-12-06
4
4th Parliament
1977-02-07
1980-12-04
5
5th Parliament
1981-02-03
1984-12-03
6
6th Parliament
1985-02-25
1988-08-16
7
7th Parliament
1989-01-09
1991-08-13
8
8th Parliament
1992-01-06
1996-12-15
9
9th Parliament
1997-05-26
2001-10-17
10
10th Parliament
2002-03-25
2006-04-19

Statistics

Average successful run time: 2 minutes

Total run time: 1 day

Total cpu time used: about 2 hours

Total disk space used: 5.04 MB

History

  • Auto ran revision d3f70154 and failed .
    nothing changed in the database
  • Auto ran revision d3f70154 and failed .
    nothing changed in the database
  • Auto ran revision d3f70154 and failed .
    nothing changed in the database
  • Auto ran revision d3f70154 and failed .
    nothing changed in the database
  • Auto ran revision d3f70154 and failed .
    nothing changed in the database
  • ...
  • Created on morph.io

Show complete history

Scraper code

Ruby

singapore-parliament / scraper.rb