philomena/lib/philomena_proxy/scrapers/scraper.ex

12 lines
343 B
Elixir
Raw Permalink Normal View History

defmodule PhilomenaProxy.Scrapers.Scraper do
@moduledoc false
alias PhilomenaProxy.Scrapers
# Return whether the given URL can be parsed by the scraper
@callback can_handle?(URI.t(), Scrapers.url()) :: boolean()
# Collect upload information from the URL
@callback scrape(URI.t(), Scrapers.url()) :: Scrapers.scrape_result()
end