lit26 / finvizfinance

Finviz analysis python library.
https://finvizfinance.readthedocs.io/en/latest/
MIT License
515 stars 85 forks source link

Allowing Elite Screeners scraping #57

Closed bestmazzo closed 1 month ago

bestmazzo commented 2 years ago

Description

Allow reading Elite Screeners with finvizfinance API

Type of change

What you did

lit26 commented 2 years ago

Can you give a screenshot of a dataframe?

bestmazzo commented 2 years ago

DATAFRAME USING FINVIZ STANDARD

https://finviz.com/screener.ashx?v={v_page}{signal}{filter}&ft=4{ticker}

   Ticker  Beta   ATR   SMA20   SMA50  SMA200  ...    RSI   Price  Change  from Open     Gap      Volume
0    SGFY   NaN  1.25  0.3023  0.4735  0.4989  ...  81.97   22.05  0.1097    -0.0413  0.1575   9143924.0
1     LXU  1.77  0.85  0.1751  0.0097  0.0266  ...  60.07   15.17  0.0929     0.0271  0.0641    775168.0
2    NRGV   NaN  0.62 -0.1333 -0.4467 -0.5454  ...  35.41    4.94  0.1051     0.0335  0.0694    777864.0
3     GNE  0.32  0.55  0.0666  0.1331  0.4962  ...  57.85    9.90  0.1000     0.0421  0.0556    176721.0
4    HASI  1.61  2.13  0.2657  0.1930 -0.0437  ...  72.33   43.46  0.0865     0.0498  0.0350   2668930.0
5     GME -0.80  2.82  0.2154  0.2892  0.2401  ...  70.79   43.45  0.0857     0.0523  0.0317  17957707.0
6     AMR  1.27  9.30  0.0566 -0.0112  0.3399  ...  54.11  141.29  0.0933     0.0623  0.0292    698743.0
7     WTI  2.29  0.45  0.2431 -0.0070  0.1670  ...  59.79    5.37  0.1674     0.0634  0.0978   9400427.0
8    HOUS  2.35  0.57  0.1447  0.1124 -0.1821  ...  67.85   11.82  0.0854     0.0639  0.0202   1155337.0
9     ODV  0.69  0.38  0.2713  0.0034 -0.4235  ...  65.28    5.33  0.1012     0.0660  0.0331    241821.0
10   NVTA  1.81  0.27  0.0853 -0.0433 -0.7470  ...  53.15    2.52  0.0957     0.0678  0.0261  14177478.0
11   FTCH  2.99  0.73  0.2335  0.1962 -0.5016  ...  62.60    9.72  0.0872     0.0681  0.0179  10966871.0
12    RNG  0.95  4.13  0.0087 -0.0579 -0.6049  ...  48.63   52.15  0.0921     0.0689  0.0218   5721318.0
13    HBM  1.94  0.26  0.1564 -0.0839 -0.3830  ...  55.51    4.00  0.0870     0.0695  0.0163   2863971.0
14    AAN   NaN  0.80  0.0177 -0.0774 -0.3010  ...  50.58   14.60  0.0961     0.0704  0.0240    401243.0
15   VLTA   NaN  0.23  0.4419  0.4167 -0.4423  ...  72.38    2.63  0.1435     0.0735  0.0652   8008384.0
16   MOGU  0.68  0.20  0.0248  0.0246 -0.5127  ...  52.34    2.17  0.1302     0.0743  0.0521     27319.0
17    MBI  1.10  0.63 -0.0106 -0.0642 -0.1189  ...  47.37   11.95  0.0953     0.0746  0.0192    683049.0
18   BLND   NaN  0.22  0.1486  0.1064 -0.5211  ...  60.75    3.23  0.0912     0.0767  0.0135   1452293.0
19   HLLY   NaN  0.65 -0.3887 -0.4001 -0.4724  ...  26.01    6.21  0.0838     0.0800  0.0035   1338119.0
20    NMG   NaN  0.42  0.2304  0.0779 -0.1951  ...  58.91    5.23  0.0896     0.0806  0.0083     46677.0
21   RVLV   NaN  2.33  0.0601  0.0370 -0.3887  ...  53.84   29.84  0.0910     0.0843  0.0062   3259042.0
22    CPS  2.83  0.79  0.8978  0.8372 -0.3076  ...  79.87    9.36  0.0973     0.0846  0.0117   1849404.0
23   FIGS   NaN  0.73  0.2521  0.4035 -0.3414  ...  73.55   12.88  0.0915     0.0851  0.0059   4708143.0
24   EGHT  1.28  0.46 -0.0094 -0.1314 -0.6105  ...  46.61    4.95  0.1024     0.0855  0.0156  10556993.0
25    CCO  2.61  0.14  0.2491  0.2565 -0.3845  ...  62.06    1.65  0.0855     0.0855  0.0000   2950659.0
26   WRBY   NaN  0.76  0.1327  0.0241 -0.5573  ...  58.67   13.70  0.1022     0.0864  0.0145   1977135.0
27    GHL  0.95  0.45  0.0784 -0.0579 -0.3893  ...  54.56    9.02  0.0881     0.0894 -0.0012    195743.0
28   DOCS   NaN  3.13 -0.0348  0.0479 -0.1696  ...  49.48   40.61  0.0884     0.0940 -0.0051   4450158.0
29   APRN -2.82  0.40  0.0013  0.0229 -0.4036  ...  51.06    3.35  0.1242     0.0948  0.0268   3872510.0
30   GBTG   NaN  0.51  0.2177  0.1257 -0.1791  ...  66.22    7.44  0.0973     0.0973  0.0000    120654.0
31   NOTE   NaN  1.18  0.0431  0.0081 -0.0057  ...  54.59    9.80  0.1516     0.0974  0.0494    206726.0
32   COOK   NaN  0.28  0.0565 -0.0935 -0.5912  ...  51.29    3.76  0.1059     0.1026  0.0029   1593104.0
33    NLS  1.68  0.15  0.2123  0.1498 -0.5065  ...  65.21    2.31  0.1268     0.1053  0.0195    927166.0
34    AKA   NaN  0.21 -0.1187 -0.3058 -0.6715  ...  39.81    2.06  0.0957     0.1075 -0.0106    394680.0
35   COMP   NaN  0.31  0.1680  0.0312 -0.3777  ...  61.54    4.60  0.1220     0.1111  0.0098   4173668.0
36   EXPR  1.41  0.14  0.2339  0.0416 -0.3250  ...  63.19    2.20  0.1828     0.1111  0.0645  11075159.0
37   EMWP   NaN  0.21  0.0907 -0.0554 -0.5552  ...  53.91    2.17  0.1071     0.1128 -0.0051    153312.0
38      W  2.90  5.60  0.3323  0.3510 -0.4556  ...  68.32   71.85  0.1531     0.1164  0.0329   5453219.0
39   FUBO  3.51  0.28  0.4794  0.3952 -0.6203  ...  74.97    3.93  0.1326     0.1165  0.0144  30985384.0
40    DTC   NaN  0.42  0.1905  0.1968 -0.4421  ...  62.00    5.50  0.1555     0.1458  0.0084   1165557.0
41   BODY   NaN  0.12  0.2984  0.1257 -0.2601  ...  67.48    1.61  0.1500     0.1583 -0.0071   1060704.0
42   CURV   NaN  0.40  0.3393  0.2181 -0.3321  ...  69.07    5.84  0.1633     0.1657 -0.0020    697975.0
43   VTEX   NaN  0.36  0.4983  0.3463 -0.3842  ...  72.79    4.93  0.1995     0.1823  0.0146    496531.0
44    SOS  0.52  0.87  0.6564 -0.0870 -0.7332  ...  63.58    9.91  0.4280     0.3860  0.0303   5410417.0

[45 rows x 14 columns]

DATAFRAME USING ELITE

https://elite.finviz.com/screener.ashx?v={v_page}{signal}{filter}&ft=4{ticker}

   Ticker  Beta   ATR   SMA20   SMA50  SMA200  ...    RSI   Price  Change  from Open     Gap      Volume
0    SGFY   NaN  1.25  0.3023  0.4735  0.4989  ...  81.97   22.05  0.1097    -0.0413  0.1575   9338115.0
1     LXU  1.77  0.85  0.1751  0.0097  0.0266  ...  60.07   15.17  0.0929     0.0271  0.0641    775824.0
2    NRGV   NaN  0.62 -0.1333 -0.4467 -0.5454  ...  35.41    4.94  0.1051     0.0335  0.0694    778224.0
3     GNE  0.32  0.55  0.0666  0.1331  0.4962  ...  57.85    9.90  0.1000     0.0421  0.0556    176740.0
4    HASI  1.61  2.13  0.2657  0.1930 -0.0437  ...  72.33   43.46  0.0865     0.0498  0.0350   2668955.0
5     GME -0.80  2.82  0.2154  0.2892  0.2401  ...  70.79   43.45  0.0857     0.0523  0.0317  17972812.0
6     AMR  1.27  9.30  0.0566 -0.0112  0.3399  ...  54.11  141.29  0.0933     0.0623  0.0292    698797.0
7     WTI  2.29  0.45  0.2431 -0.0070  0.1670  ...  59.79    5.37  0.1674     0.0634  0.0978   9403279.0
8    HOUS  2.35  0.57  0.1447  0.1124 -0.1821  ...  67.85   11.82  0.0854     0.0639  0.0202   1157583.0
9     ODV  0.69  0.38  0.2713  0.0034 -0.4235  ...  65.28    5.33  0.1012     0.0660  0.0331    241911.0
10   NVTA  1.81  0.27  0.0853 -0.0433 -0.7470  ...  53.15    2.52  0.0957     0.0678  0.0261  14179381.0
11   FTCH  2.99  0.73  0.2335  0.1962 -0.5016  ...  62.60    9.72  0.0872     0.0681  0.0179  10967281.0
12    RNG  0.95  4.13  0.0087 -0.0579 -0.6049  ...  48.63   52.15  0.0921     0.0689  0.0218   5721857.0
13    HBM  1.94  0.26  0.1564 -0.0839 -0.3830  ...  55.51    4.00  0.0870     0.0695  0.0163   2869075.0
14    AAN   NaN  0.80  0.0177 -0.0774 -0.3010  ...  50.58   14.60  0.0961     0.0704  0.0240    401034.0
15   VLTA   NaN  0.23  0.4419  0.4167 -0.4423  ...  72.38    2.63  0.1435     0.0735  0.0652   8014036.0
16   MOGU  0.68  0.20  0.0248  0.0246 -0.5127  ...  52.34    2.17  0.1302     0.0743  0.0521     27319.0
17    MBI  1.10  0.63 -0.0106 -0.0642 -0.1189  ...  47.37   11.95  0.0953     0.0746  0.0192    683049.0
18   BLND   NaN  0.22  0.1486  0.1064 -0.5211  ...  60.75    3.23  0.0912     0.0767  0.0135   1454697.0
19   HLLY   NaN  0.65 -0.3887 -0.4001 -0.4724  ...  26.01    6.21  0.0838     0.0800  0.0035   1339138.0
20    NMG   NaN  0.42  0.2304  0.0779 -0.1951  ...  58.91    5.23  0.0896     0.0806  0.0083     46755.0
21   RVLV   NaN  2.33  0.0601  0.0370 -0.3887  ...  53.84   29.84  0.0910     0.0843  0.0062   3259045.0
22    CPS  2.83  0.79  0.8978  0.8372 -0.3076  ...  79.87    9.36  0.0973     0.0846  0.0117   1849445.0
23   FIGS   NaN  0.73  0.2521  0.4035 -0.3414  ...  73.55   12.88  0.0915     0.0851  0.0059   4708450.0
24   EGHT  1.28  0.46 -0.0094 -0.1314 -0.6105  ...  46.61    4.95  0.1024     0.0855  0.0156  10560018.0
25    CCO  2.61  0.14  0.2491  0.2565 -0.3845  ...  62.06    1.65  0.0855     0.0855  0.0000   2950811.0
26   WRBY   NaN  0.76  0.1327  0.0241 -0.5573  ...  58.67   13.70  0.1022     0.0864  0.0145   1977135.0
27    GHL  0.95  0.45  0.0784 -0.0579 -0.3893  ...  54.56    9.02  0.0881     0.0894 -0.0012    195743.0
28   DOCS   NaN  3.13 -0.0348  0.0479 -0.1696  ...  49.48   40.61  0.0884     0.0940 -0.0051   4450196.0
29   APRN -2.82  0.40  0.0013  0.0229 -0.4036  ...  51.06    3.35  0.1242     0.0948  0.0268   3874045.0
30   GBTG   NaN  0.51  0.2177  0.1257 -0.1791  ...  66.22    7.44  0.0973     0.0973  0.0000    120654.0
31   NOTE   NaN  1.18  0.0431  0.0081 -0.0057  ...  54.59    9.80  0.1516     0.0974  0.0494    206739.0
32   COOK   NaN  0.28  0.0565 -0.0935 -0.5912  ...  51.29    3.76  0.1059     0.1026  0.0029   1593157.0
33    NLS  1.68  0.15  0.2123  0.1498 -0.5065  ...  65.21    2.31  0.1268     0.1053  0.0195    927176.0
34    AKA   NaN  0.21 -0.1187 -0.3058 -0.6715  ...  39.81    2.06  0.0957     0.1075 -0.0106    396866.0
35   COMP   NaN  0.31  0.1680  0.0312 -0.3777  ...  61.54    4.60  0.1220     0.1111  0.0098   4178805.0
36   EXPR  1.41  0.14  0.2339  0.0416 -0.3250  ...  63.19    2.20  0.1828     0.1111  0.0645  11100925.0
37   EMWP   NaN  0.21  0.0907 -0.0554 -0.5552  ...  53.91    2.17  0.1071     0.1128 -0.0051    153450.0
38      W  2.90  5.60  0.3323  0.3510 -0.4556  ...  68.32   71.85  0.1531     0.1164  0.0329   5573513.0
39   FUBO  3.51  0.28  0.4794  0.3952 -0.6203  ...  74.97    3.93  0.1326     0.1165  0.0144  31073908.0
40    DTC   NaN  0.42  0.1905  0.1968 -0.4421  ...  62.00    5.50  0.1555     0.1458  0.0084   1178008.0
41   BODY   NaN  0.12  0.2984  0.1257 -0.2601  ...  67.48    1.61  0.1500     0.1583 -0.0071   1065577.0
42   CURV   NaN  0.40  0.3393  0.2181 -0.3321  ...  69.07    5.84  0.1633     0.1657 -0.0020    705676.0
43   VTEX   NaN  0.36  0.4983  0.3463 -0.3842  ...  72.79    4.93  0.1995     0.1823  0.0146    496531.0
44    SOS  0.52  0.87  0.6564 -0.0870 -0.7332  ...  63.58    9.91  0.4280     0.3860  0.0303   5421626.0

[45 rows x 14 columns]
lit26 commented 2 years ago

So the only difference is the elite account gets the real-time data while the general account gets the delay data?

bestmazzo commented 2 years ago

Yes, page structure seems to be almost the same it's just taken from a different domain having not-delayed data

lit26 commented 2 years ago

So instead of calling login every time. Login should be called once with sessions.

piotrgolawski commented 2 years ago

Hi guys, I need that, well... for sure not only me. Will you be merging that?

lit26 commented 2 years ago

Hi guys, I need that, well... for sure not only me. Will you be merging that?

This PR is incomplete and requests for changes. I will not merge this.

piotrgolawski commented 2 years ago

Hi guys, I need that, well... for sure not only me. Will you be merging that?

This PR is incomplete and requests for changes. I will not merge this.

Yes, of course. But my real question was, will you implement login option?

lit26 commented 2 years ago

Yup, will do.

lit26 commented 1 month ago

This is closed due to inactivity