diff options
-rw-r--r-- | src/Network/Torrent/Tracker/Scrape.hs | 7 |
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 | |||
85 | scrape :: URI -- ^ Announce 'URI'. | 85 | scrape :: 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. |
88 | scrape announce ihs = undefined | 88 | scrape 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 | -- |