Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added module to scrap NBA Twitter handles #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nhatbui
Copy link

@nhatbui nhatbui commented May 28, 2016

My contribution to this very cool package: I had needs to get the Twitter accounts off of basketball-reference.com and this package had a great foundation. The Twitter module simply scraps the page. I did not add any functionality to query it. I also included an example of what can be done.

def gen_player_twitters(self):
twitter_list = self.soup.find('div', {'id': 'div_stats'})
headers = [th.text for th in twitter_list.find_all('th')]
rows = [row for row in twitter_list.tbody.find_all('tr')]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a problem with the indentation

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused: the indentation is obviously wrong in the commit but when I visit the file on my repo, it looks fine. file in repo

@FranGoitia
Copy link
Owner

FranGoitia commented May 28, 2016

Thanks for your contribution. It is indeed useful and according to Nate Silver, professional gambler Haralabos Voulgaris, inputs data from players's Twitter to his ML models.
I'll merge it once the indentation issues are solved.

it was fine on my macbook I swear.
@nhatbui
Copy link
Author

nhatbui commented Jul 22, 2016

Hi! I should have updated the indentation correctly. Thanks for pointing it out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants