import requests UserAgentString = {'User-Agent':'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.75.14 (KHTML, like Gecko) Version/7.0.3 Safari/7046A194A'}FeedPingUrl = 'stores already pinged Url through https://feedburner.google.com/fb/a/ping'pingFeedburner = requests.get(FeedPingUrl,UserAgentString)
Above is the code iam using, but the feed is updated only when i run the code on the computer but feeds dont update when the same code runs inside aws lambda funtion.
The FeedPingUrl varible contains url which is used to update the specific Feed.
This is how its explianed in the website https://feedburner.google.com/fb/a/ping
Hint: Bookmark this page after hitting the "Ping FeedBurner" buttonand use that bookmark as a handy way to update your feed from yourbookmarks menu! This form uses FeedBurner's underlying Ping andExtended Ping XML-RPC API.
I have also tried using User agent string but was of no use.
Aws lambda function runs successfully only thing is ping feedburner doesnt seem to work.
Update 1 : I had to mention that this code is just part of much larger code which all together run on AWS lambda function. I’ve set timeout up to 10 seconds.But the complete code takes 2-3ms to execute as mention in lambda logs.
Update 2 : I’ve tried running ping as separate lambda function and main code in different lambda function. the ping function takes 500-600ms but where as the complete code that includes the ping and the main code took 2-3ms as mentioned in Update 1. This is very unclear.
Update 3: Ive been using scheduled trigger of 2 minute interval for the lambda function