initial commit for the-great-escape yuku scraper
This commit is contained in:
17
tge/scrapers/__init__.py
Normal file
17
tge/scrapers/__init__.py
Normal file
@@ -0,0 +1,17 @@
|
||||
from . import yuku
|
||||
|
||||
scrapers = [yuku]
|
||||
|
||||
def get_scraper (name):
|
||||
for scraper in scrapers:
|
||||
if scraper.__name__.endswith(".{}".format(name)):
|
||||
return scraper
|
||||
|
||||
raise Exception("Unknown scraper: {}".format(name))
|
||||
|
||||
def guess_scraper (url):
|
||||
for scraper in scrapers:
|
||||
if scraper.can_scrape_url(url):
|
||||
return scraper
|
||||
|
||||
raise Exception("Unable to guess scraper for forum url: {}".format(url))
|
Reference in New Issue
Block a user