Quote:
Originally Posted by Starson17
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&season=2010&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.
|
1 question
1) I found the iframe
Code:
<div class="articleText"> <p>CHICAGO -- The Bears say they will hold defensive tackle <a href="/players/tommieharris/profile?id=HAR548445">Tommie Harris</a> out of Monday night's game against the <a href="/teams/greenbaypackers/profile?team=GB">Green Bay Packers</a> on a coach's decision.</p> <p>
<div class="pcard-wrapper nfl-tag-right" id="pcard-JMEDKDWV-wrapper">
<iframe src="/widget/playercard?esbId=HAR548445&season=2010&gameId=" id="pcard-JMEDKDWV" frameborder="0"></iframe>
</div>
1) you said build the url, then put it into the soup wherever i want it. Can you point me to a recipe that does this or enlighten me ? I might have even doing it in the past but i'm having memory lapse if i have. thanks
something like this maybe? :confused
Just not grasping this one yet