Go to file
Dominik b66496c640 Final Update
-> fixed the "title" variable
2021-03-31 23:39:30 +02:00
ShadowLibrary Change to Curl 2019-03-17 21:52:13 +01:00
app Final Update 2021-03-31 23:39:30 +02:00
.gitignore Init 2019-03-10 20:30:05 +01:00
LICENSE Init 2019-03-10 20:30:05 +01:00
README.md Final Update 2021-03-31 23:39:30 +02:00
shadow-library.cabal Version 1.0 2021-03-30 22:32:28 +02:00
stack.yaml Init 2019-03-10 20:30:05 +01:00
stack.yaml.lock My own .hs file (aneks.hs) 2021-03-27 22:26:33 +01:00

README.md

Zadanie "robot haskell"

Przykładowy output:

ShadowItem {url = Just "https://aneks.kulturaliberalna.pl/wp-content/uploads/2016/02/51%C3%94%C3%87%C3%B452-With-Watermark.pdf", title = "Aneks Nr 51\8211\&52 1988", itype = "periodical", originalDate = Just "2016", creator = Nothing, format = Just "pdf", lang = Just "pol", finalUrl = "https://aneks.kulturaliberalna.pl/wp-content/uploads/2016/02/51%C3%94%C3%87%C3%B452-With-Watermark.pdf", description = Nothing}

Ekstrakcja info o .pdf ze strony https://aneks.kulturaliberalna.pl/archiwum-aneksu/:

extractRecords = extractLinksWithText "//a[contains(@title,'Aneks') and contains(text(),'Nr')]"  
                 >>> second (arr $ replace "\n" "") 
                 >>> first (extractLinksWithText "//div/a[contains(@href,'.pdf')]") -- pobieramy stronę z adresu URL i wyciągamy linki z tej strony pasujące do wyrażenia XPathowego
                 -- ostatecznie wyjdą trójki? ((Link, tekst: "Wyświetl cały numer"), Numer Magazynu)```