jitenbot/bot/crawlers/scrapers/jitenon.py

11 lines
284 B
Python
Raw Normal View History

import re
from bot.crawlers.scrapers.scraper import BaseScraper
class Jitenon(BaseScraper):
def _get_netloc_re(self):
domain = r"jitenon\.jp"
pattern = r"^(?:([A-Za-z0-9.\-]+)\.)?" + domain + r"$"
netloc_re = re.compile(pattern)
return netloc_re