Last active
August 29, 2015 14:16
-
-
Save codervince/14f77fbf269d689b87fd to your computer and use it in GitHub Desktop.
TASKS FOR RPSPIDER
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rpsider.py | |
1. for i, r in enumerate(response.xpath("//table/tbody")): | |
GET following items from grid table | |
for i, r in enumerate(response.xpath("//table/tbody")): | |
#tds - blank horsenumber, lbw, horsename country sp (td span a), age, carrierWt, OR, TS , OPR, RATED | |
#if * then not logged in! | |
position | |
lbw | |
horse_id | |
horsename | |
horsecountry | |
sp | |
age | |
weight | |
extraweight | |
trainer_name | |
OR | |
TS | |
RPR | |
jockey_name | |
commentText | |
add to list add to item loader | |
2. SALES: | |
horse_sales = response.xpath("//div[@id='horse_sales']/table") | |
if horse_sales: | |
get totals in PRICE COLUMN AND CURRENCY --> MONEY | |
into item totalsales | |
3. rpraceday | |
lastrace = row.select("table[contains(@class,'grid smallSpaceGrid')]/table/tbody/tr[2]").extract() | |
need to extract last race details - cannot find this table |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment