Ver código fonte

Fix media.csv and gracefully handle missing authorities field

main
Adrian Short 6 anos atrás
pai
commit
eb61210618
2 arquivos alterados com 6 adições e 3 exclusões
  1. +5
    -2
      lib/site.rb
  2. +1
    -1
      media.csv

+ 5
- 2
lib/site.rb Ver arquivo

@@ -79,8 +79,11 @@ class Site
apps = ScraperWiki.select("* from applications where authority_name = ?
order by date_received desc", auth['authority_name'])

this_stories = stories.select \
{ |story| story['authorities'].match(auth['authority_name']) }
this_stories = stories.select do |story|
if story['authorities']
story['authorities'].match(auth['authority_name'])
end
end

path = ['authorities', slug(auth['authority_name'])]
Petrify.page(path, 'authority', \


+ 1
- 1
media.csv Ver arquivo

@@ -11,7 +11,7 @@ publish_date,publication,title,url,authorities
2018-04-06,Adblock Bristol,"Act now! 34 new digital advertising screens planned for Bristol city centre",http://adblockbristol.org.uk/2018/04/act-now-thirty-four-new-digital-advertising-screens-planned-for-bristol-city-centre/,Bristol
2018-04-12,Bristol Post,"BT's new InLink WiFi portals will introduce dozens of new security cameras to Bristol's streets",https://www.bristolpost.co.uk/news/bristol-news/bts-new-inlink-wifi-portals-1445687,Bristol
2018-04-17,Bristol Cable,"Opinion: Bristol’s new phoneboxes could end up spying on you",https://thebristolcable.org/2018/04/opinion-bts-spy-kiosks-could-be-coming-to-bristol/,Bristol|London
2018-04-20,Sky News,"Swipe: Upgraded phone boxes",https://youtu.be/rMnMtWdwNe8?t=126,
2018-04-20,Sky News,"Swipe: Upgraded phone boxes",https://youtu.be/rMnMtWdwNe8?t=126,""
2018-04-23,Bristol Walking Alliance,"InLink advertising monoliths",https://bristolwalkingalliance.org.uk/2018/04/23/inlink-advertising-monoliths/,Bristol
2018-05-23,Adblock Bristol,"Success! 34 digital advertising screens rejected by Bristol City Council",http://adblockbristol.org.uk/2018/05/success-advertising-screens-rejected/,Bristol
2018-07-07,Ham&High,"Revealed: How new digital phone boxes are helping to drive Camden’s drug trade",http://www.hamhigh.co.uk/news/crime-court/new-bt-inlink-panels-being-used-by-camden-s-drug-trade-1-5550889,Camden


Carregando…
Cancelar
Salvar