[MTOS-dev] Developing action streams
John Eckman
eckman.john at gmail.com
Sun Feb 24 15:56:44 PST 2008
Hello all -
First, is there a better place to ask questions about the Action
Streams plugin?
These two pages both fail on my OpenID:
http://plugins.movabletype.org/action-streams/
http://www.movabletype.org/2008/01/building_action_streams.html
But even if I could log in I'm not sure comments are the best place
for this kind of query.
I'm trying to build an action stream for the Activity Streams plugin,
on MTOS 4.1, to show items added to an Amazon wishlist.
Here's the relevant info from the config.yaml I'm trying to use:
name: Amazon
id: amazon
key: amazon
description: Fetches from Amazon Wishlist Feed
profile_services:
amazon:
name: Amazon Wishlist
url: http://www.amazon.com/gp/registry/wishlist/%s
ident_example: http://www.amazon.com/gp/registry/wishlist/xxxxxxxxxxxxx
icon: images/amazon.png
action_streams:
amazon:
purchased:
name: Purchased
description: Items added to amazon wishlist
html_form: 'New music purchase: <a href="[_2]">[_3]</a>'
html_params:
- url
- title
url: 'http://www.amazon.com/gp/registry/wishlist/{{ident}}'
identifier: url
scraper:
foreach: //tbody[@name]
get:
thumbnail:
- //tr/td[@rowspan="4"]/a/img
- @src
title:
- //tr/td[@class="small"]/b/a
- TEXT
url:
- //tr/td[@class="small"]/b/a
- @href
Questions:
- Any obvious reasons why this doesn't work? Can't seem to match the
img, which is inside a td with a rowspan of 4.
- Is there a log anywhere of what the scraper is doing? I wanted to
try different XPath queries but felt like was working blind- ended up
with blank or with various Scalar() values - which I assume means the
xpath expression matched too many things.
You can see a sample wishlist here: http://www.amazon.com/gp/registry/wishlist/AIOY8FQZ99E9
To see the format - basically I'm grabbing each tbody that has a name
attribute, and can get the title and url, but can't seem to match the
image.
Thanks in advance for any guidance-
John
----------------------------------------
John Eckman
eckman.john at gmail.com
http://www.johneckman.com/
More information about the MTOS-dev
mailing list