From aa5d40e597a527652d7acddd3ef9c53cd7aee631 Mon Sep 17 00:00:00 2001 From: Michael Witrant Date: Sat, 24 Sep 2011 11:15:08 +0200 Subject: [PATCH] parse links --- consultation_ipred/Gemfile | 3 + consultation_ipred/Gemfile.lock | 10 + consultation_ipred/organisations.html | 527 +++++++++++++++++++++ consultation_ipred/parser.rb | 17 + consultation_ipred/public_authorities.html | 527 +++++++++++++++++++++ 5 files changed, 1084 insertions(+) create mode 100644 consultation_ipred/Gemfile create mode 100644 consultation_ipred/Gemfile.lock create mode 100644 consultation_ipred/organisations.html create mode 100644 consultation_ipred/parser.rb create mode 100644 consultation_ipred/public_authorities.html diff --git a/consultation_ipred/Gemfile b/consultation_ipred/Gemfile new file mode 100644 index 0000000..1b86a78 --- /dev/null +++ b/consultation_ipred/Gemfile @@ -0,0 +1,3 @@ +source "http://rubygems.org" + +gem 'nokogiri' diff --git a/consultation_ipred/Gemfile.lock b/consultation_ipred/Gemfile.lock new file mode 100644 index 0000000..1eb9f06 --- /dev/null +++ b/consultation_ipred/Gemfile.lock @@ -0,0 +1,10 @@ +GEM + remote: http://rubygems.org/ + specs: + nokogiri (1.5.0) + +PLATFORMS + ruby + +DEPENDENCIES + nokogiri diff --git a/consultation_ipred/organisations.html b/consultation_ipred/organisations.html new file mode 100644 index 0000000..60d1331 --- /dev/null +++ b/consultation_ipred/organisations.html @@ -0,0 +1,527 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CIRCABC - Organisations + + + + + + + + + + + + + + +
+ +
+
+
+ + + +
+
+
+ +
+ + +
+
+
+ +
+ + + + + + + +
+ + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ Http +  |  + Links | + + + Back + +
+ + + +
+ +
+
+ Icône de la bibliothèque +
+
+ Organisations + +
+ La bibliothèque est lespace de stockage, de gestion et de partage des contenus. +
+ +
+
+ + + + + + + + + + + + +
+ + +
+ + + + +


+ +

.Spaces
+
Titre Date de modification Actions
Aucun élément à afficher
Page 1 of 1  Cette action est actuellement désactivée Cette action est actuellement désactivée 1 Cette action est actuellement désactivée Cette action est actuellement désactivée
+
+ + + +
.Content
+
Titre Taille Date de modification Actions
Icône du format de fichier du document act_en.pdf74.85 KB11 July 2011 11:02View DetailsDownloadCopy
Icône du format de fichier du document aepoc_ en.pdf213.49 KB11 July 2011 11:00View DetailsDownloadCopy
Icône du format de fichier du document afep_fr.pdf150 KB11 July 2011 11:02View DetailsDownloadCopy
Icône du format de fichier du document aim_en.pdf129.89 KB11 July 2011 11:00View DetailsDownloadCopy
Icône du format de fichier du document aippi_belgium_en.pdf241.11 KB11 July 2011 11:01View DetailsDownloadCopy
Icône du format de fichier du document aippi_finland_en.pdf32.74 KB11 July 2011 11:01View DetailsDownloadCopy
Icône du format de fichier du document aippi_general_secretariat_annex1_q163 _en.pdf50.83 KB11 July 2011 11:01View DetailsDownloadCopy
Icône du format de fichier du document aippi_general_secretariat_annex2_q216_resolution_en.pdf60.9 KB11 July 2011 11:03View DetailsDownloadCopy
Icône du format de fichier du document aippi_general_secretariat_en.pdf37.84 KB11 July 2011 11:03View DetailsDownloadCopy
Icône du format de fichier du document allegroup_en.pdf84.26 KB11 July 2011 11:00View DetailsDownloadCopy
Icône du format de fichier du document alliance_against_ip_theft_en.pdf529.09 KB11 July 2011 11:01View DetailsDownloadCopy
Icône du format de fichier du document alstom_en.pdf110.44 KB11 July 2011 11:03View DetailsDownloadCopy
Icône du format de fichier du document andema_en.pdf146.01 KB11 July 2011 10:59View DetailsDownloadCopy
Icône du format de fichier du document anica_fapav_univideo_en.pdf271.04 KB11 July 2011 11:02View DetailsDownloadCopy
Icône du format de fichier du document apm_de.pdf33.05 KB11 July 2011 11:02View DetailsDownloadCopy
Icône du format de fichier du document apram_fr.pdf88.69 KB11 July 2011 11:03View DetailsDownloadCopy
Icône du format de fichier du document april_fr.pdf376.46 KB11 July 2011 11:02View DetailsDownloadCopy
Icône du format de fichier du document apt_it.pdf123.87 KB11 July 2011 11:04View DetailsDownloadCopy
Icône du format de fichier du document association_francaise_ubuntu_fr.pdf16.05 KB11 July 2011 11:01View DetailsDownloadCopy
Icône du format de fichier du document assotelecomunicazioni_asstel_en.pdf93.14 KB11 July 2011 11:00View DetailsDownloadCopy
Icône du format de fichier du document aukro_bulgaria_en.pdf207.72 KB11 July 2011 11:00View DetailsDownloadCopy
Icône du format de fichier du document aukro_czech_rep_en.pdf249.93 KB11 July 2011 11:03View DetailsDownloadCopy
Icône du format de fichier du document aukro_slovakia_en.pdf/td>197.42 KB11 July 2011 11:02View DetailsDownloadCopy
Icône du format de fichier du document bascap_en.pdf160.94 KB11 July 2011 11:02View DetailsDownloadCopy
Icône du format de fichier du document bdwi_de.pdf446.23 KB11 July 2011 11:03View DetailsDownloadCopy
Icône du format de fichier du document bdzv_vdz_en_de.pdf165.23 KB11 July 2011 10:59View DetailsDownloadCopy
Icône du format de fichier du document benelux_verenging_voor_merken_en_modellenrecht_nl.pdf16.26 KB11 July 2011 11:01View DetailsDownloadCopy
Icône du format de fichier du document beuc_en.pdf432.73 KB11 July 2011 11:01View DetailsDownloadCopy
Icône du format de fichier du document bits_of_freedom_en.pdf128.17 KB11 July 2011 11:03View DetailsDownloadCopy
Icône du format de fichier du document boev_de.pdf32.79 KB11 July 2011 11:02View DetailsDownloadCopy
Page 1 of 7  Cette action est actuellement désactivée Cette action est actuellement désactivée 1 2 3 4 5 6 7 Next Page Last Page
+
+ + + +
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/consultation_ipred/parser.rb b/consultation_ipred/parser.rb new file mode 100644 index 0000000..f272c17 --- /dev/null +++ b/consultation_ipred/parser.rb @@ -0,0 +1,17 @@ + +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 diff --git a/consultation_ipred/public_authorities.html b/consultation_ipred/public_authorities.html new file mode 100644 index 0000000..de98ce6 --- /dev/null +++ b/consultation_ipred/public_authorities.html @@ -0,0 +1,527 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CIRCABC - Public authorities + + + + + + + + + + + + + + +
+ +
+
+
+ + + +
+
+
+ +
+ + +
+
+
+ +
+ + + + + + + +
+ + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ Http +  |  + Links | + + + Back + +
+ + + +
+ +
+
+ Icône de la bibliothèque +
+
+ Public authorities + +
+ La bibliothèque est lespace de stockage, de gestion et de partage des contenus. +
+ +
+
+ + + + + + + + + + + + +
+ + +
+ + + + +


+ +

.Spaces
+
Titre Date de modification Actions
Aucun élément à afficher
Page 1 of 1  Cette action est actuellement désactivée Cette action est actuellement désactivée 1 Cette action est actuellement désactivée Cette action est actuellement désactivée
+
+ + + +
.Content
+
Titre Taille Date de modification Actions
Icône du format de fichier du document ak_oesterreich_de.pdf1.32 MB11 July 2011 10:53View DetailsDownloadCopy
Icône du format de fichier du document belgium_en.pdf48.71 KB11 July 2011 10:54View DetailsDownloadCopy
Icône du format de fichier du document bulgaria_en.pdf40.3 KB11 July 2011 10:53View DetailsDownloadCopy
Icône du format de fichier du document czech_republic_en.pdf38.54 KB11 July 2011 10:53View DetailsDownloadCopy
Icône du format de fichier du document danish_chamber_of_commerce_en.pdf76.83 KB11 July 2011 10:53View DetailsDownloadCopy
Icône du format de fichier du document denmark_en.pdf53.39 KB11 July 2011 10:54View DetailsDownloadCopy
Icône du format de fichier du document deutscher_bundestag_de.pdf401.24 KB11 July 2011 10:53View DetailsDownloadCopy
Icône du format de fichier du document european_parliament_committee_on_legal_affairs_en.pdf313 KB11 July 2011 10:53View DetailsDownloadCopy
Icône du format de fichier du document finland_ministry_of_empl_and_economy_en.pdf441.58 KB11 July 2011 10:53View DetailsDownloadCopy
Icône du format de fichier du document finnish_commerce_federation_fi.pdf53.71 KB11 July 2011 10:53View DetailsDownloadCopy
Icône du format de fichier du document france.pdf70.67 KB11 July 2011 10:53View DetailsDownloadCopy
Icône du format de fichier du document germany_de.pdf33.84 KB11 July 2011 10:53View DetailsDownloadCopy
Icône du format de fichier du document hadopi_fr.pdf181.33 KB11 July 2011 10:53View DetailsDownloadCopy
Icône du format de fichier du document hungary_ministry_public_ administration_and_justice_en.pdf147.19 KB11 July 2011 10:54View DetailsDownloadCopy
Icône du format de fichier du document ireland_en.pdf249.3 KB11 July 2011 10:54View DetailsDownloadCopy
Icône du format de fichier du document italy_ministry_of_agrifood_en.pdf14.09 KB11 July 2011 10:53View DetailsDownloadCopy
Icône du format de fichier du document italy_office_of_the_prime_minister_it.pdf381.12 KB11 July 2011 10:54View DetailsDownloadCopy
Icône du format de fichier du document latvia_en.pdf31.8 KB11 July 2011 10:54View DetailsDownloadCopy
Icône du format de fichier du document lithuania_ministry_culture_lt.pdf1.21 MB11 July 2011 10:53View DetailsDownloadCopy
Icône du format de fichier du document malta_en.pdf45.92 KB11 July 2011 10:53View DetailsDownloadCopy
Icône du format de fichier du document netherlands_ministry_security_justice_annex1_nl.pdf30.5 KB11 July 2011 10:53View DetailsDownloadCopy
Icône du format de fichier du document netherlands_ministry_security_justice_annex2_nl.pdf67.29 KB11 July 2011 10:54View DetailsDownloadCopy
Icône du format de fichier du document netherlands_ministry_security_justice_nl.pdf66.42 KB11 July 2011 10:53View DetailsDownloadCopy
Icône du format de fichier du document parti_pirate_fr.pdf127.61 KB11 July 2011 10:53View DetailsDownloadCopy
Icône du format de fichier du document poland_ministry_culture_en.pdf138.88 KB11 July 2011 10:53View DetailsDownloadCopy
Icône du format de fichier du document poland_ministry_culture_pl.pdf152.09 KB11 July 2011 10:53View DetailsDownloadCopy
Icône du format de fichier du document portugal_pt.pdf34.63 KB11 July 2011 10:54View DetailsDownloadCopy
Icône du format de fichier du document romania_en.pdf70.31 KB11 July 2011 10:53View DetailsDownloadCopy
Icône du format de fichier du document romania_ro.pdf2.11 MB11 July 2011 10:53View DetailsDownloadCopy
Icône du format de fichier du document slovakia_sk.pdf91.19 KB11 July 2011 10:53View DetailsDownloadCopy
Page 1 of 2  Cette action est actuellement désactivée Cette action est actuellement désactivée 1 2 Next Page Last Page
+
+ + + +
+ +
+
+ + + + + + + + \ No newline at end of file -- GitLab