Skip to content
This repository was archived by the owner on Dec 22, 2023. It is now read-only.

MLB_Stats Scrapper #24

Closed
wants to merge 5 commits into from
Closed

Conversation

Tomyzon1728
Copy link

@Tomyzon1728 Tomyzon1728 commented Sep 29, 2020

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.

  • I have named my files and folder, according to this project's guidelines.
  • My code follows the style guidelines of this project.
  • My Pull Request has a descriptive title. (not a vague title like Update index.md)
  • I have commented on my code, particularly in hard-to-understand areas.
  • I have created a helpful and easy to understand README.md, according to the given README_TEMPLATE.
  • I have included a requirements.txt file (if external libraries are required.)
  • My changes do not produce any warnings.
  • I have added a working sample/screenshot of the script.

Tomyzon1728 and others added 2 commits September 29, 2020 16:10
@Tomyzon1728
Copy link
Author

@AdityaJ7 and @chavarera , I've followed due process and my code works perfectly

Copy link
Member

@AdityaJ7 AdityaJ7 left a 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

@Tomyzon1728
Copy link
Author

Ok will make changes

Copy link
Member

@chavarera chavarera left a 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

@Tomyzon1728
Copy link
Author

Ok will do that before tomorrow

@Tomyzon1728
Copy link
Author

@AdityaJ7 I've changed the jupyter notebook to a python script. Also, the issue was to convert MLB stats to a CSV file .
@chavarera made the required changes as well .

Copy link
Member

@AdityaJ7 AdityaJ7 left a 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!

@AdityaJ7
Copy link
Member

AdityaJ7 commented Oct 1, 2020

@AdityaJ7 I've changed the jupyter notebook to a python script. Also, the issue was to convert MLB stats to a CSV file .
@chavarera made the required changes as well .

@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

Copy link
Member

@chavarera chavarera left a 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)
Copy link
Member

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

@Tomyzon1728
Copy link
Author

Ok will make necessary edit
Thanks guys

Copy link
Member

@chavarera chavarera left a 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)

@chavarera
Copy link
Member

@Tomyzon1728 are you working on it?

@AdityaJ7
Copy link
Member

Will close this PR after 2 days @Tomyzon1728

@AdityaJ7 AdityaJ7 closed this Oct 26, 2020
@AdityaJ7 AdityaJ7 added the invalid This doesn't seem right label Oct 26, 2020
@github-actions
Copy link

Python World does not accept pull requests on this repository anymore.

@github-actions github-actions bot locked and limited conversation to collaborators Jun 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
invalid This doesn't seem right
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants