Skip to content

Commit

Permalink
update version
Browse files Browse the repository at this point in the history
  • Loading branch information
lit26 committed Aug 15, 2020
1 parent 07a8172 commit b9ea136
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
author = 'Tianning Li'

# The full version, including alpha/beta/rc tags
release = '0.4'
release = '0.4.1'


# -- General configuration ---------------------------------------------------
Expand Down
6 changes: 6 additions & 0 deletions docs/group.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,9 @@ Performance

.. automodule:: finvizfinance.group.performance
:members:

Spectrum
=============

.. automodule:: finvizfinance.group.spectrum
:members:
37 changes: 37 additions & 0 deletions finvizfinance/group/spectrum.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
from finvizfinance.group.overview import Overview
from finvizfinance.util import webScrap, imageScrap

"""
.. module:: group.spectrum
:synopsis: group spectrum image.
.. moduleauthor:: Tianning Li <[email protected]>
"""

class Spectrum(Overview):
"""Spectrum inherit from overview module.
Getting information from the finviz group spectrum page.
"""
def __init__(self):
"""initiate module
"""
self.BASE_URL = 'https://finviz.com/groups.ashx?{group}&v=310'
self.url = self.BASE_URL.format(group='g=sector')
Overview._loadSetting(self)

def ScreenerView(self, group='Sector', order='Name', out_dir=''):
"""Get screener table.
Args:
group(str): choice of group option
order(str): sort the table by the choice of order
"""
if group not in self.group_dict:
raise ValueError()
if order not in self.order_dict:
raise ValueError()
self.url = self.BASE_URL.format(group=self.group_dict[group])+'&'+self.order_dict[order]

soup = webScrap(self.url)
url = 'https://finviz.com/' + soup.findAll('img')[5]['src']
imageScrap(url, group, '')
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

HERE = pathlib.Path(__file__).parent

VERSION = '0.4'
VERSION = '0.4.1'
PACKAGE_NAME = 'finvizfinance'
AUTHOR = 'Tianning Li'
AUTHOR_EMAIL = '[email protected]'
Expand Down

0 comments on commit b9ea136

Please sign in to comment.