Skip to content

Commit b8ba035

Browse files
committed
some scraper tests
1 parent 56a6f79 commit b8ba035

2 files changed

Lines changed: 34 additions & 2 deletions

File tree

lib/ingestors/ingestor_factory.rb

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ def self.ingestors
1212
Ingestors::TessEventIngestor,
1313
Ingestors::ZenodoIngestor,
1414
Ingestors::OaiPmhIngestor,
15-
Ingestors::GithubIngestor,
16-
] + taxila_ingestors + llm_ingestors + heptraining_ingestors
15+
Ingestors::GithubIngestor
16+
] + taxila_ingestors + llm_ingestors + heptraining_ingestors + pantraining_ingestors
1717
end
1818

1919
def self.taxila_ingestors
@@ -57,6 +57,12 @@ def self.heptraining_ingestors
5757
]
5858
end
5959

60+
def self.pantraining_ingestors
61+
[
62+
Ingestors::Pantraining::PanIngestorB
63+
]
64+
end
65+
6066
def self.ingestor_config
6167
@ingestor_config ||= ingestors.map do |i|
6268
[i.config[:key], i.config.merge(ingestor: i)]
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
require 'icalendar'
2+
require 'nokogiri'
3+
require 'open-uri'
4+
require 'tzinfo'
5+
6+
module Ingestors
7+
module Pantraining
8+
class LaserlabEventIngestor < Ingestor
9+
def self.config
10+
{
11+
key: 'laserlab_event',
12+
title: 'Laserlab Events',
13+
category: :events
14+
}
15+
end
16+
17+
def read(url)
18+
@verbose = false
19+
scrape_laserlab_events(url)
20+
end
21+
22+
scrape_laserlab_events(url)
23+
html = get_html_from_url(url)
24+
end
25+
end
26+
end

0 commit comments

Comments
 (0)