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

NCAAF Receiving Yards #418

Open
enachmany opened this issue May 8, 2020 · 2 comments
Open

NCAAF Receiving Yards #418

enachmany opened this issue May 8, 2020 · 2 comments
Labels
question Further information is requested

Comments

@enachmany
Copy link

It seems that the API cannot pull receiving yards for wide receivers.

@roclark roclark added the question Further information is requested label Oct 17, 2020
@roclark
Copy link
Owner

roclark commented Oct 17, 2020

Hey @enachmany, I apologize this is very overdue, but can you provide some additional information on the issue you are seeing if you are still running into this? I am not able to reproduce on my end:

from sportsreference.ncaaf.roster import Player

harris = Player('najee-harris-1')
print(harris.receiving_yards)
# 432

If you are seeing something in particular, I would be happy to create a fix for it!

@enachmany
Copy link
Author

enachmany commented Oct 17, 2020

Hi @roclark and thank you so much for getting back to me. For some reason it is not working for receivers when I try to loop through team rosters. As an example:

from sportsreference.ncaaf.roster import Roster

y=['oklahoma']

print('Players:')
for i in y:
    b12 = Roster(i)
    x=i
    try:
        x=i.replace('-',' ')
    except:
        x=i.title()
    x=x.title()
    for player in b12.players:
        if player.receiving_yards is None:
            continue
        elif player.receiving_yards <50:
            continue
        else:
            print(player.height,player.weight,x,player.year,player.position,player.name,':',player.receiving_yards)

# Players:
# 5-9 193 Oklahoma  RB T.J. Pledger : 90
# 5-11 211 Oklahoma  RB Seth McGowan : 79
# 5-11 214 Oklahoma SO RB Kennedy Brooks : 136
# 6-0 246 Oklahoma JR RB Rhamondre Stevenson : 87

What am I doing wrong? The receivers are not coming up.

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

No branches or pull requests

2 participants