Open GoogleCodeExporter opened 8 years ago
can you enhance this patch to respect the value for totalresults that the gdata
api returns? For example:
http://gdata.youtube.com/feeds/base/users/raywilliamjohnson/uploads?alt=rss&v=2&
orderby=published
<openSearch:totalResults>316</openSearch:totalResults><openSearch:startIndex>1</
openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage>
The gdata API throws a 400 error when you request a start-index greater than
that number.
Original comment by jeromeku...@gmail.com
on 30 May 2011 at 6:48
Oh hey, thanks for reviewing and applying the other patches.
Sorry for the late repply, I don't check my Gmail account very often...
Your idea to use totalresults instead of relying on the error is excellent, I
would gladly implement it.
Unfortunately, I think this whole patch should be rejected for now because I
found other problems with it. Since it uses blind string splicing to construct
a single feed from multiple feeds, it will sometimes create invalid XML if
different pages of results uses different XML namespaces.
There is no way to fix this until RSS Handler is enhanced to use proper XML
parsing everywhere instead or regex/string splicing. That way, when multiple
feeds are merged into one using the DOM API, they will automatically drag in
their corresponding XML namespaces into the merged feed.
I may work on adding proper XML parsing if I get some time in the following
weeks.
P.S.
What formatting style do you prefer for patches? Some parts of the code use
2-space indent, but other parts use tab-indent. Let me know which one is the
"official" one.
Original comment by grr...@gmail.com
on 15 Jun 2011 at 2:55
Original issue reported on code.google.com by
grr...@gmail.com
on 19 May 2011 at 5:21Attachments: