diff options
author | Joris | 2019-09-03 23:25:39 +0200 |
---|---|---|
committer | Joris | 2019-09-03 23:25:39 +0200 |
commit | 223ae6aa0b14c071d5719ada0cc6b43e9199a81b (patch) | |
tree | 6fc822b7b9bde1989e3c040eb52e5f4d52c49923 /src/test/haskell | |
parent | 5cedcecd6ae31e2485dcab2ddd74c74a4779545d (diff) |
Use wreq instead of http-conduit to maintain cookies in a session
Diffstat (limited to 'src/test/haskell')
-rw-r--r-- | src/test/haskell/Main.hs | 6 |
1 files changed, 3 insertions, 3 deletions
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 |