From 7333a4f118fd56e1782b0d58e954cf65665d40eb Mon Sep 17 00:00:00 2001 From: Xevion Date: Sun, 19 Jan 2020 20:03:28 -0600 Subject: [PATCH] add Episode scraping url I hate just about everything about this for some reason, I want to put it somewhere else, but I can't. --- app/models.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/models.py b/app/models.py index 76c96e6..d59658e 100644 --- a/app/models.py +++ b/app/models.py @@ -43,6 +43,10 @@ class Episode(db.Model): season_id = db.Column(db.Integer, db.ForeignKey('season.id')) # correlating season number sections = db.relationship('Section', backref='episode', lazy='dynamic') # sections of quotes under this episode + @property + def scrapeURL(self): + return f'http://officequotes.net/no{self.season_id}-{str(self.number).zfill(2)}.php' + class Section(db.Model): """represents a Section of Quotes, a specific scene with relevant dialog""" id = db.Column(db.Integer, primary_key=True)