Search This Site

Custom Search

Monday, January 10, 2011

Re: [bloggerDev] Re: Having trouble accessing rss files

Yeah, POST has very different semantics to GET. It'd mean we're either doing form handling using that url as an endpoint, or that we are doing some AtomPub style document publishing through it. Neither of which are the case =)

On Tue, Jan 11, 2011 at 10:02 AM, Sam Auciello <olleicua@gmail.com> wrote:
Thanks,

I was using urllib2 through an addition api layer that I built my self
and the additional layer was adding an empty post by default.  For
whatever reason, urllib2 uses POST if any post is specified even "{}"
and what I needed was "None".  I didn't think it mattered but I guess
blogger only allows GET requests for rss feeds not POST.

Peace
~Sam

On Jan 10, 5:45 pm, Brett Morgan <brettmor...@google.com> wrote:
> I'm wondering why you are POSTing to /rss.xml ? GET works.
>
> $ curlhttp://someone.blogspot.com/rss.xml| tidy -xml -quiet -indent
> <?xml version='1.0' encoding='utf-8'?>
> <?xml-stylesheet href="http://www.blogger.com/styles/atom.css"
> type="text/css"?>
> <feed xmlns='http://www.w3.org/2005/Atom'
> xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'
> xmlns:georss='http://www.georss.org/georss'
> xmlns:thr='http://purl.org/syndication/thread/1.0'>
>   <id>tag:blogger.com,1999:blog-3259189</id>
>   <updated>2010-11-15T00:15:21.031-08:00</updated>
>   <title type='text'></title>
>   <subtitle type='html'>O t&#195;&#173;tulo n&#195;&#163;o diz
>   tudo?</subtitle>
>   <link rel='http://schemas.google.com/g/2005#feed'
>   type='application/atom+xml'
>   href='http://someone.blogspot.com/feeds/posts/default'/>
>   <link rel='self' type='application/atom+xml'
>   href='http://www.blogger.com/feeds/3259189/posts/default'/>
>   <link rel='alternate' type='text/html'
>   href='http://someone.blogspot.com/'/>
>   <link rel='hub' href='http://pubsubhubbub.appspot.com/'/>
>   <author>
>     <name>Thiago</name>
>     <uri>http://www.blogger.com/profile/07547068507340553791</uri>
>     <email>nore...@blogger.com</email>
>   </author>
>   <generator version='7.00' uri='http://www.blogger.com'>
>   Blogger</generator>
>   <openSearch:totalResults>4</openSearch:totalResults>
>   <openSearch:startIndex>1</openSearch:startIndex>
>   <openSearch:itemsPerPage>25</openSearch:itemsPerPage>
>   <entry>
> ...
>
>
>
> On Tue, Jan 11, 2011 at 9:14 AM, Sam Auciello <ollei...@gmail.com> wrote:
> > I'm trying to make a python script that checks various blogs etc for
> > me.  I'd use an ordinary rss reader but some blogs / sites do not have
> > rss feeds so I'm building my own partly for convenience and partly as
> > an exercise.  Anyway, I'm using urllib2 and having trouble accessing
> > the blogspot feeds.  I get the following http headers:
>
> > send: u'POST /rss.xml HTTP/1.1\r\nAccept-Encoding: identity\r\nContent-
> > Length: 0\r\nHost: someblog.blogspot.com\r\nAccept: application/rss+xml
> > \r\nUser-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US;
> > rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10\r\nConnection: close\r
> > \nContent-Type: application/x-www-form-urlencoded\r\n\r\n'
> > reply: 'HTTP/1.1 415 Unsupported Media Type\r\n'
> > header: Content-Type: text/html; charset=UTF-8
> > header: Date: Mon, 10 Jan 2011 21:49:20 GMT
> > header: Expires: Mon, 10 Jan 2011 21:49:20 GMT
> > header: Cache-Control: private, max-age=0
> > header: X-Content-Type-Options: nosniff
> > header: X-XSS-Protection: 1; mode=block
> > header: Server: GSE
> > header: Connection: close
>
> > Why do I see "HTTP/1.1 415 Unsupported Media Type" despite specifying
> > Accept: "application/rss+xml"?
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Blogger Developer Group" group.
> > To post to this group, send email to bloggerdev@googlegroups.com.
> > To unsubscribe from this group, send email to
> > bloggerdev+unsubscribe@googlegroups.com<bloggerdev%2Bunsubscribe@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/bloggerdev?hl=en.
>
> --
> Brett Morgan
>
> *Developer Programs Engineer, Blogger*

--
You received this message because you are subscribed to the Google Groups "Blogger Developer Group" group.
To post to this group, send email to bloggerdev@googlegroups.com.
To unsubscribe from this group, send email to bloggerdev+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/bloggerdev?hl=en.




--
Brett Morgan

Developer Programs Engineer, Blogger

--
You received this message because you are subscribed to the Google Groups "Blogger Developer Group" group.
To post to this group, send email to bloggerdev@googlegroups.com.
To unsubscribe from this group, send email to bloggerdev+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/bloggerdev?hl=en.

No comments:

Post a Comment