View Single Post
Old 09-27-2010, 07:50 PM   #8
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by TonytheBookworm View Post
Okay after messing with this for a while I finally figured out why the pcard is not showing up. Yet, I don't know how exactly to fix it. So could you hook the jumper cables to me and give me a jump-start please ?

When using liveHttp and tamperData i noticed that a request is sent out for
http://www.nfl.com/widget/playercard...n=2010&gameId= (which turns out to be the pcard data)

So my question is: do i add that as an addheader? or is it a br.open('http://www.nfl.com/widget/playercard?esbId=EDW720778&season=2010&gameId=') ?

Sorry for all the questions but i'm totally in the dark on this one
You're close. Note that "esbId=EDW72077" is the player ID. The player ID is in the iframe part of the page you're scraping. Here's code grabbed from a print in the recipe:
Code:
<iframe src="/widget/playercard?esbId=NOR780922&amp;season=2010&amp;gameId=" id="pcard-EOCVFPSS" frameborder="0"></iframe>
You just build the URL, grab the soup with:
Code:
soup = self.index_to_soup(URL)
then put it into your soup of the page where you want it.
Starson17 is offline   Reply With Quote