-
Notifications
You must be signed in to change notification settings - Fork 263
Conversation
@AdityaJ7 and @chavarera , I've followed due process and my code works perfectly |
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.
Please make a script which takes input from the user about the player whose stat they want to scarpe.
Don't use jupyter notebook.
Jupyter Notebook is good for analysis purpose, but here we want to make a dynamic script which can be used by others directly from the command line without making changes in the code.
Please read issue statement carefully.
Thanks
Ok will make changes |
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 Add multiple out put files
Make a script instead of writing code in notebook
Ok will do that before tomorrow |
@AdityaJ7 I've changed the jupyter notebook to a python script. Also, the issue was to convert MLB stats to a CSV 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.
Please add a requirements.txt file and add a screenshot of calling the script from the terminal and remove the old screenshot that you provided
Also please comment your code in necessary areas and please divide your code into functions!
@Tomyzon1728 Read the issue again carefully , it says the user of the script must enter the name of the player whose stat they want to scrape!!!! You have hardcoded one player only |
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.
Add different functions to perform specific tasks
import requests | ||
from bs4 import BeautifulSoup | ||
url = "http://www.espn.com/mlb/history/leaders/_/breakdown/season/year/2018/start/1" | ||
page = requests.get (url) |
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.
Follow DRY(Don't Repeat Yourself) principal
write a separate function which perform following task(Single function)
Accept URL,
Create Request
Get Page Source
Convert Into Soup Object
Return soup object
Ok will make necessary edit |
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.
write a separate function which perform following task(Single function)
@Tomyzon1728 are you working on it? |
Will close this PR after 2 days @Tomyzon1728 |
Python World does not accept pull requests on this repository anymore. |
Description
A short summary of what is included in your Pull Request.
Replace
issue_no
in the above line, with the issue related to this PR.Type of change
Choosing one or more options from the following as per the nature of your Pull request.
NOTE: These boxes can be checked using
[X]
Bug fix (non-breaking change which fixes an issue)
New feature (non-breaking change which adds functionality)
Documentation Update
Checklist:
Please tick all the boxes that are fulfilled by your Pull Request.
Update index.md
)README.md
, according to the givenREADME_TEMPLATE.