Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
LQDN Adminsys
amendments
Commits
aa5d40e5
Commit
aa5d40e5
authored
Sep 24, 2011
by
Michael Witrant
Browse files
parse links
parent
5fda2c19
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
consultation_ipred/Gemfile
0 → 100644
View file @
aa5d40e5
source
"http://rubygems.org"
gem
'nokogiri'
consultation_ipred/Gemfile.lock
0 → 100644
View file @
aa5d40e5
GEM
remote: http://rubygems.org/
specs:
nokogiri (1.5.0)
PLATFORMS
ruby
DEPENDENCIES
nokogiri
consultation_ipred/organisations.html
0 → 100644
View file @
aa5d40e5
This diff is collapsed.
Click to expand it.
consultation_ipred/parser.rb
0 → 100644
View file @
aa5d40e5
require
"rubygems"
require
"bundler/setup"
require
"nokogiri"
files
=
%w(organisations.html public_authorities.html)
file
=
files
.
first
doc
=
Nokogiri
::
HTML
(
File
.
read
(
file
))
links
=
doc
.
css
(
"a"
).
map
do
|
link
|
href
=
link
[
"href"
]
href
if
href
=~
/\.pdf$/i
end
.
compact
p
links
consultation_ipred/public_authorities.html
0 → 100644
View file @
aa5d40e5
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment