From 223ae6aa0b14c071d5719ada0cc6b43e9199a81b Mon Sep 17 00:00:00 2001 From: Joris Date: Tue, 3 Sep 2019 23:25:39 +0200 Subject: Use wreq instead of http-conduit to maintain cookies in a session --- src/test/haskell/Main.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/test/haskell') diff --git a/src/test/haskell/Main.hs b/src/test/haskell/Main.hs index ba6d466..541cc54 100644 --- a/src/test/haskell/Main.hs +++ b/src/test/haskell/Main.hs @@ -1,6 +1,6 @@ import Data.Maybe (catMaybes) import qualified Data.Text.IO as T -import qualified Network.HTTP.Conduit as H +import qualified Network.Wreq.Session as Session import Test.Hspec import qualified Ads @@ -12,7 +12,7 @@ import qualified Parser.LeboncoinParser as LeboncoinParser main :: IO () main = do - manager <- H.newManager H.tlsManagerSettings + session <- Session.newSession hspec $ do describe "LeboncoinParser" $ do @@ -26,7 +26,7 @@ main = do it "should parse ads from remote page" $ do ads <- FetchAd.leboncoin - manager + session ["https://www.leboncoin.fr/annonces/offres/ile_de_france/"] checkAds ads -- cgit v1.2.3