Advertisement
Guest User

Untitled

a guest
May 14th, 2017
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. from Products.CMFCore.utils import getToolByName
  2. catalog = getToolByName(context, 'portal_catalog')
  3. results = catalog(portal_type='checkorphan.news')
  4. for brain in results:
  5. newsObj=brain.getObject()
  6. print "Id: "+ str(newsObj.intid)
  7. print "Id: "+ newsObj.id
  8. print "Title: "+ newsObj.title
  9. print "Category:"+ newsObj.category
  10. print "Source Title: " + str(newsObj.source_title)
  11. print "Source URL: " + str(newsObj.source_url)
  12. print "Author Name: "+ str(newsObj.author_name)
  13. print "Author Email: "+ str(newsObj.author_email)
  14. print "Published At: "+ str(newsObj.publish_at)
  15. print "Timezone: "+ str(newsObj.timezone)
  16. print newsObj.body.raw #THIS LINE CAUSES INSUFFICIENT PRIVILEVGE
  17. return printed
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement