04-04-2011, 01:57 PM | #1 |
Junior Member
Posts: 2
Karma: 10
Join Date: Mar 2011
Location: Argentina
Device: kindle
|
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 |
04-04-2011, 02:09 PM | #2 |
creator of calibre
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) |
Advert | |
|
04-08-2011, 06:20 AM | #3 |
Junior Member
Posts: 2
Karma: 10
Join Date: Mar 2011
Location: Argentina
Device: kindle
|
Thank a lot! I will try that!!
|
Tags |
get_browser, recipe, user-agent |
|
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 |