packages feed

gscholar-rss 0.2.0.0 → 0.2.1.0

raw patch · 2 files changed

+8/−3 lines, 2 files

Files

gscholar-rss.cabal view
@@ -1,5 +1,5 @@ name:                gscholar-rss-version:             0.2.0.0+version:             0.2.1.0 synopsis:            scrapes google scholar, provides RSS feed description:         A simple Google Scholar scraper, providing RSS/Atom                      feeds. Check homepage for manual and examples.
src/Main.hs view
@@ -17,6 +17,7 @@ import qualified Data.Text.Encoding as TE import qualified Data.String        as DS import qualified Text.URI           as U+import qualified Data.List          as L   main :: IO ()@@ -104,8 +105,7 @@ -- removes 'ots' and 'sig' from a google books url cleanGBooks :: URL -> URL cleanGBooks url-        | U.uriRegName uri ==-            Just "books.google.it" =+        | condA =             let                 qry = U.uriQueryItems uri                 fqr = filter filtFun qry@@ -117,6 +117,11 @@           uri = maybe (error "gclean: misparse")                       id                       (U.parseURI $ T.unpack url)++          condA = let rn = maybe (error "regname") id+                                 (U.uriRegName uri)+                  in L.isPrefixOf "books.google" rn+           filtFun :: (String, String) -> Bool           filtFun (l, _) = not (elem l ["ots", "sig"])