-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.py
36 lines (29 loc) · 1.22 KB
/
test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import json
from transgenderwachttijd.providers.scrapers.base import Scraper
from transgenderwachttijd.providers.scrapers.amc import ScraperAMC
from transgenderwachttijd.providers.scrapers.devaart import ScraperDeVaart
from transgenderwachttijd.providers.scrapers.jonx import ScraperJonx
from transgenderwachttijd.providers.scrapers.oog import ScraperOOG
from transgenderwachttijd.providers.scrapers.psytrans import ScraperPsyTrans
from transgenderwachttijd.providers.scrapers.radboudumc import ScraperRadboudumc
from transgenderwachttijd.providers.scrapers.umcg import ScraperUMCG
def test(scraper_name: str):
scraper: Scraper
if scraper_name == 'amc':
scraper = ScraperAMC()
elif scraper_name == 'devaart':
scraper = ScraperDeVaart()
elif scraper_name == 'jonx':
scraper = ScraperJonx()
elif scraper_name == 'oog':
scraper = ScraperOOG()
elif scraper_name == 'psytrans':
scraper = ScraperPsyTrans()
elif scraper_name == 'radboudumc':
scraper = ScraperRadboudumc()
elif scraper_name == 'umcg':
scraper = ScraperUMCG()
else:
raise Exception(f'Unknown scraper "{scraper_name}"')
print(json.dumps(scraper.scrape(), indent=2))
test('devaart')