{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "python setup.py sdist bdist_wheel\n", "\n", "twine upload --skip-existing dist/*" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "import ScraperFC as sfc\n", "import traceback" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "10/29\r" ] } ], "source": [ "scraper = sfc.FBRef()\n", "try:\n", " per90, perc = scraper.scrape_complete_scouting_reports(year=2022, league='EPL', goalkeepers=True)\n", "# comp, per90, perc = scraper.complete_report_from_player_link('https://fbref.com/en/players/92e7e919/Son-Heung-min')\n", "except:\n", " traceback.print_exc()\n", "finally:\n", " scraper.close()" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
Standard Stats...Advanced GoalkeepingPlayerPositionMinutes
Goals AgainstShots on Target AgainstSavesSave%WinsDrawsLossesClean SheetsClean Sheet PercentagePenalty Kicks Attempted...Launch% (Goal Kicks)Avg. Length of Goal KicksCrosses FacedCrosses StoppedCrosses Stopped %Def. Actions Outside Pen. AreaAvg. Distance of Def. Actions
01.003.412.4672.60.520.260.220.3939.10.11...38.237.76.850.7210.51.3917.7AlissonGoalkeepers4140
10.552.181.8283.30.360.360.180.5560.00.18...22.222.64.730.367.71.2720.3Kepa ArrizabalagaGoalkeepers495
21.754.422.9264.20.170.250.580.1312.50.17...81.859.29.380.798.40.3313.2Karl DarlowGoalkeepers2160
30.692.081.5070.40.730.100.170.5453.80.10...34.836.14.460.316.90.8116.3EdersonGoalkeepers4680
41.213.902.7770.40.560.210.230.2828.20.10...79.256.69.790.747.60.2312.1Lukasz FabianskiGoalkeepers3510
51.544.212.7966.30.210.210.580.2120.80.13...40.739.08.420.465.40.7516.0Alvaro FernandezGoalkeepers2160
61.714.432.7161.30.290.140.570.000.00.14...85.763.29.860.575.81.1417.0Ben FosterGoalkeepers630
71.314.022.7767.90.480.290.240.2928.60.05...36.733.87.120.365.00.3614.1David de GeaGoalkeepers3765
\n", "

8 rows × 40 columns

\n", "
" ], "text/plain": [ " Standard Stats \\\n", " Goals Against Shots on Target Against Saves Save% Wins Draws Losses \n", "0 1.00 3.41 2.46 72.6 0.52 0.26 0.22 \n", "1 0.55 2.18 1.82 83.3 0.36 0.36 0.18 \n", "2 1.75 4.42 2.92 64.2 0.17 0.25 0.58 \n", "3 0.69 2.08 1.50 70.4 0.73 0.10 0.17 \n", "4 1.21 3.90 2.77 70.4 0.56 0.21 0.23 \n", "5 1.54 4.21 2.79 66.3 0.21 0.21 0.58 \n", "6 1.71 4.43 2.71 61.3 0.29 0.14 0.57 \n", "7 1.31 4.02 2.77 67.9 0.48 0.29 0.24 \n", "\n", " ... \\\n", " Clean Sheets Clean Sheet Percentage Penalty Kicks Attempted ... \n", "0 0.39 39.1 0.11 ... \n", "1 0.55 60.0 0.18 ... \n", "2 0.13 12.5 0.17 ... \n", "3 0.54 53.8 0.10 ... \n", "4 0.28 28.2 0.10 ... \n", "5 0.21 20.8 0.13 ... \n", "6 0.00 0.0 0.14 ... \n", "7 0.29 28.6 0.05 ... \n", "\n", " Advanced Goalkeeping \\\n", " Launch% (Goal Kicks) Avg. Length of Goal Kicks Crosses Faced \n", "0 38.2 37.7 6.85 \n", "1 22.2 22.6 4.73 \n", "2 81.8 59.2 9.38 \n", "3 34.8 36.1 4.46 \n", "4 79.2 56.6 9.79 \n", "5 40.7 39.0 8.42 \n", "6 85.7 63.2 9.86 \n", "7 36.7 33.8 7.12 \n", "\n", " \\\n", " Crosses Stopped Crosses Stopped % Def. Actions Outside Pen. Area \n", "0 0.72 10.5 1.39 \n", "1 0.36 7.7 1.27 \n", "2 0.79 8.4 0.33 \n", "3 0.31 6.9 0.81 \n", "4 0.74 7.6 0.23 \n", "5 0.46 5.4 0.75 \n", "6 0.57 5.8 1.14 \n", "7 0.36 5.0 0.36 \n", "\n", " Player Position Minutes \n", " Avg. Distance of Def. Actions \n", "0 17.7 Alisson Goalkeepers 4140 \n", "1 20.3 Kepa Arrizabalaga Goalkeepers 495 \n", "2 13.2 Karl Darlow Goalkeepers 2160 \n", "3 16.3 Ederson Goalkeepers 4680 \n", "4 12.1 Lukasz Fabianski Goalkeepers 3510 \n", "5 16.0 Alvaro Fernandez Goalkeepers 2160 \n", "6 17.0 Ben Foster Goalkeepers 630 \n", "7 14.1 David de Gea Goalkeepers 3765 \n", "\n", "[8 rows x 40 columns]" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "per90" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
Standard Stats...Advanced GoalkeepingPlayerPositionMinutes
Goals AgainstShots on Target AgainstSavesSave%WinsDrawsLossesClean SheetsClean Sheet PercentagePenalty Kicks Attempted...Launch% (Goal Kicks)Avg. Length of Goal KicksCrosses FacedCrosses StoppedCrosses Stopped %Def. Actions Outside Pen. AreaAvg. Distance of Def. Actions
087263477794616909023...21231168959596AlissonGoalkeepers4140
1992399548510989957...2115559499Kepa ArrizabalagaGoalkeepers495
2127265201043935550...9390738471716Karl DarlowGoalkeepers2160
39811609849989816...152113437490EdersonGoalkeepers4680
467495460852120646318...898782775314Lukasz FabianskiGoalkeepers3510
534655733142393383928...24295121146687Alvaro FernandezGoalkeepers2160
61373517337901136...93958339219395Ben FosterGoalkeepers630
75855554376572266654...191715510939David de GeaGoalkeepers3765
\n", "

8 rows × 40 columns

\n", "
" ], "text/plain": [ " Standard Stats \\\n", " Goals Against Shots on Target Against Saves Save% Wins Draws Losses \n", "0 87 26 34 77 79 46 16 \n", "1 99 2 3 99 54 85 10 \n", "2 12 72 65 20 10 43 93 \n", "3 98 1 1 60 98 4 9 \n", "4 67 49 54 60 85 21 20 \n", "5 34 65 57 33 14 23 93 \n", "6 13 73 51 7 33 7 90 \n", "7 58 55 55 43 76 57 22 \n", "\n", " ... \\\n", " Clean Sheets Clean Sheet Percentage Penalty Kicks Attempted ... \n", "0 90 90 23 ... \n", "1 98 99 57 ... \n", "2 5 5 50 ... \n", "3 98 98 16 ... \n", "4 64 63 18 ... \n", "5 38 39 28 ... \n", "6 1 1 36 ... \n", "7 66 65 4 ... \n", "\n", " Advanced Goalkeeping \\\n", " Launch% (Goal Kicks) Avg. Length of Goal Kicks Crosses Faced \n", "0 21 23 11 \n", "1 2 1 1 \n", "2 93 90 73 \n", "3 15 21 1 \n", "4 89 87 82 \n", "5 24 29 51 \n", "6 93 95 83 \n", "7 19 17 15 \n", "\n", " \\\n", " Crosses Stopped Crosses Stopped % Def. Actions Outside Pen. Area \n", "0 68 95 95 \n", "1 5 55 94 \n", "2 84 71 7 \n", "3 3 43 74 \n", "4 77 53 1 \n", "5 21 14 66 \n", "6 39 21 93 \n", "7 5 10 9 \n", "\n", " Player Position Minutes \n", " Avg. Distance of Def. Actions \n", "0 96 Alisson Goalkeepers 4140 \n", "1 99 Kepa Arrizabalaga Goalkeepers 495 \n", "2 16 Karl Darlow Goalkeepers 2160 \n", "3 90 Ederson Goalkeepers 4680 \n", "4 4 Lukasz Fabianski Goalkeepers 3510 \n", "5 87 Alvaro Fernandez Goalkeepers 2160 \n", "6 95 Ben Foster Goalkeepers 630 \n", "7 39 David de Gea Goalkeepers 3765 \n", "\n", "[8 rows x 40 columns]" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "perc" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.8" } }, "nbformat": 4, "nbformat_minor": 4 }