-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/parsing #49
base: master
Are you sure you want to change the base?
Feature/parsing #49
Conversation
changed SEKRET_KEY to a more complex version
|
|
||
| def parse_anekdot(): | ||
| ''' | ||
| Simple func for collecting jokes from anekdotitut.ru |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't abbreviate or shorten words. Spelling is important.
| for joke in jokes: | ||
| # Check for entry in DB. | ||
| if not bool(Joke.query.filter_by(joke_text = joke.text).first()): | ||
| j = Joke(joke_text = joke.text, user_id = 999) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Magic number 999
| @@ -0,0 +1 @@ | |||
| Generic single-database configuration. No newline at end of file | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You forget new line at end of file
| @@ -0,0 +1,18 @@ | |||
| # Config Classes | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Useless comments
| @@ -0,0 +1 @@ | |||
| {{ feed_blank }} No newline at end of file | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't forget about new line at end of file
| if not bool(Joke.query.filter_by(joke_text = joke.text).first()): | ||
| j = Joke(joke_text = joke.text, user_id = 999) | ||
| db.session.add(j) | ||
| db.session.commit() No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No new line at end of file
| ''' | ||
| jokes_out = [] | ||
| for i in range(1, 10): | ||
| url = url = 'https://anekdotitut.ru/pro_armyanskoe_radio' + str( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
url = url What is that?
| ''' | ||
| Return generate wrapped in jingles file from upload_file | ||
| ''' | ||
| pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:(
| ''' | ||
| Return generate base audio file from joke_text | ||
| ''' | ||
| pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:(
| ''' | ||
| Return generate file with name of episode prefix from upload_file | ||
| ''' | ||
| pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:(
| @@ -0,0 +1 @@ | |||
| # Here will be Flask Web Forms | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Useless comment
| scheduler.start() | ||
|
|
||
| # Shut down the scheduler when exiting the app | ||
| atexit.register(lambda: scheduler.shutdown()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need lambda here?
No description provided.