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.
This commit is contained in:
Xevion
2020-01-19 20:03:28 -06:00
parent 3e73d9f1f8
commit 7333a4f118

View File

@@ -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)