Skip to content

Commit

Permalink
Consolidate Seats for Women
Browse files Browse the repository at this point in the history
These are listed here as individual seats, but are on Wikidata as a
group
  • Loading branch information
tmtmtmtm committed Apr 11, 2019
1 parent 9961529 commit a92272d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scraper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,12 @@ class MemberItem < Scraped::HTML
end

field :area do
return 'reserved seat for Women' if womens?
tds[2].text.tidy
end

field :area_id do
return 'Q59390111' if womens?
tds[2].xpath('.//a/@wikidata').text
end

Expand All @@ -57,6 +59,10 @@ class MemberItem < Scraped::HTML
def tds
noko.css('td')
end

def womens?
noko.xpath('.//preceding::h3').last.text.downcase.include? 'women members'
end
end

url = 'https://en.wikipedia.org/wiki/List_of_members_of_the_10th_Jatiya_Sangsad'
Expand Down

0 comments on commit a92272d

Please sign in to comment.