Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Recipes

Notices

Reply
 
Thread Tools Search this Thread
Old 04-04-2011, 01:57 PM   #1
fsismonda
Junior Member
fsismonda began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Mar 2011
Location: Argentina
Device: kindle
Question Define the user-agent on a recipe



Hi, I need to define the browser user-agent in a recipe in order to get the rss feed.

How can I do that.

I read that should be using get_browser(), but I wasn't be able to find any example of this.

Can some one probide an example of this?

Thanks
fsismonda is offline   Reply With Quote
Old 04-04-2011, 02:09 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,856
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Code:
def get_browser(self, *args, **kwargs):
   from calibre import browser
   kwargs['user_agent'] = 'whatever'
   return browser(*args, **kwargs)
kovidgoyal is offline   Reply With Quote
Advert
Old 04-08-2011, 06:20 AM   #3
fsismonda
Junior Member
fsismonda began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Mar 2011
Location: Argentina
Device: kindle
Thank a lot! I will try that!!
fsismonda is offline   Reply With Quote
Reply

Tags
get_browser, recipe, user-agent


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Is it possible to define rules for non break space? habanr Conversion 4 02-22-2011 07:36 AM
Browser's User Agent string Polvo Kindle Developer's Corner 0 11-18-2010 06:50 AM
An observation on ratings...how do you define your scale? texasnightowl Calibre 12 08-18-2010 01:59 PM
Post your user-created recipe here! GatorDeb Calibre 3 06-29-2009 03:00 PM
How define my favorite connection ? Kiba iRex 0 07-22-2008 09:29 AM


All times are GMT -4. The time now is 09:03 PM.


MobileRead.com is a privately owned, operated and funded community.