summaryrefslogtreecommitdiff
path: root/src/Network/Torrent/Tracker
diff options
context:
space:
mode:
authorSam T <sta.cs.vsu@gmail.com>2013-04-08 06:56:54 +0400
committerSam T <sta.cs.vsu@gmail.com>2013-04-08 06:56:54 +0400
commit52fb797f692ffc4867a9cfddb9cfdcb0d90bdb71 (patch)
treeb341d64cb83098fe27f507977c1f58813ee4ae04 /src/Network/Torrent/Tracker
parent2934fbff3159288cbb51a11f42f1a135223f93d0 (diff)
impl scrape
Diffstat (limited to 'src/Network/Torrent/Tracker')
-rw-r--r--src/Network/Torrent/Tracker/Scrape.hs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Network/Torrent/Tracker/Scrape.hs b/src/Network/Torrent/Tracker/Scrape.hs
index ae800230..5152b79f 100644
--- a/src/Network/Torrent/Tracker/Scrape.hs
+++ b/src/Network/Torrent/Tracker/Scrape.hs
@@ -85,8 +85,13 @@ scrapeURL uri ihs = do
85scrape :: URI -- ^ Announce 'URI'. 85scrape :: URI -- ^ Announce 'URI'.
86 -> [InfoHash] -- ^ Torrents to be scrapped. 86 -> [InfoHash] -- ^ Torrents to be scrapped.
87 -> IO (Result Scrape) -- ^ 'ScrapeInfo' for each torrent. 87 -> IO (Result Scrape) -- ^ 'ScrapeInfo' for each torrent.
88scrape announce ihs = undefined 88scrape announce ihs
89 | Just uri<- scrapeURL announce ihs = do
90 rawResp <- simpleHTTP (Request uri GET [] "")
91 respBody <- getResponseBody rawResp
92 return (decoded (BC.pack respBody))
89 93
94 | otherwise = return (Left "Tracker do not support scraping")
90 95
91-- | More particular version of 'scrape', just for one torrent. 96-- | More particular version of 'scrape', just for one torrent.
92-- 97--