add logo
This commit is contained in:
parent
2e7e3da309
commit
c1e33e96cf
1 changed files with 33 additions and 7 deletions
40
spiderrss.py
40
spiderrss.py
|
|
@ -11,16 +11,39 @@ from config import base_directory, update_interval, max_age, verbose, feeds
|
||||||
import logging
|
import logging
|
||||||
import sys, getopt
|
import sys, getopt
|
||||||
|
|
||||||
|
|
||||||
|
'''
|
||||||
|
Output functions
|
||||||
|
'''
|
||||||
|
|
||||||
def log(text):
|
def log(text):
|
||||||
if verbose:
|
if verbose:
|
||||||
#logging.info(text)
|
#logging.info(text)
|
||||||
print('{} - {}'.format(datetime.now().strftime('%d.%m %H:%M'), text))
|
print('{} - {}'.format(datetime.now().strftime('%d.%m %H:%M'), text))
|
||||||
|
|
||||||
|
|
||||||
def error(text):
|
def error(text):
|
||||||
#logging.error(text)
|
#logging.error(text)
|
||||||
print('{} - ERROR: {}'.format(datetime.now().strftime('%d.%m %H:%M'), text))
|
print('{} - ERROR: {}'.format(datetime.now().strftime('%d.%m %H:%M'), text))
|
||||||
|
|
||||||
|
|
||||||
|
def print_logo():
|
||||||
|
logo = '''
|
||||||
|
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
###### ###### ## ##### ###### ###### ###### ###### ######
|
||||||
|
## ## ## ## ## ## ## ## ## ## ## ## ##
|
||||||
|
###### ###### ## ## ## ##### ###### ###### ###### ######
|
||||||
|
## ## ## ## ## ## ## ## ## ## ## ##
|
||||||
|
###### ## ## ##### ###### ## ## ## ## ###### ######
|
||||||
|
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
'''
|
||||||
|
|
||||||
|
print(logo)
|
||||||
|
|
||||||
|
'''
|
||||||
|
Utility functions
|
||||||
|
'''
|
||||||
|
|
||||||
# Get content of a webpage
|
# Get content of a webpage
|
||||||
def get_html_content(url):
|
def get_html_content(url):
|
||||||
response = requests.get(url)
|
response = requests.get(url)
|
||||||
|
|
@ -124,15 +147,18 @@ def get_help_message():
|
||||||
|
|
||||||
def main(argv):
|
def main(argv):
|
||||||
|
|
||||||
# Get arguments
|
print_logo()
|
||||||
try:
|
|
||||||
opts, args = getopt,getopt(argv, 'h', ['ifile=', 'ofile='])
|
|
||||||
except:
|
|
||||||
print('spiderrss.py [ run | create_config <file> ]')
|
|
||||||
|
|
||||||
for opt, arg in opts:
|
## Get arguments
|
||||||
if opt == '-h'
|
#try:
|
||||||
|
# opts, args = getopt,getopt(argv, 'h', ['ifile=', 'ofile='])
|
||||||
|
#except:
|
||||||
|
# print('spiderrss.py [ run | create_config <file> ]')
|
||||||
|
|
||||||
|
#for opt, arg in opts:
|
||||||
|
# if opt == '-h':
|
||||||
|
# print('spiderrss.py [ run | create_config <file> ]')
|
||||||
|
|
||||||
|
|
||||||
#initialize()
|
#initialize()
|
||||||
#crawl()
|
#crawl()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue