View Single Post
Old 03-01-2009, 01:23 AM   #1
Solari
Member
Solari began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Mar 2009
Device: Kindle2
Parser can't identify form used for user/pass

Greetings,

I am trying to be able to login into my Stratfor paid account to download stories to my Kindle. For whatever reason it can't identify the form name on either http://www.stratfor.com or http://www.stratfor.com/user to login with.

Can anyone help?

Thanks,
Ray

Error:

Code:
Job: **Fetch news from Stratfor**
**tuple**: ('FormNotFoundError', u"no form matching name 'form_id'")
**Traceback**:
Traceback (most recent call last):
File "/Applications/calibre.app/Contents/console.app/Contents/Resources/lib/python2.6/site-packages.zip/calibre/parallel.py", line 957, in worker
result = work(client_socket, func, args, kwdargs)
File "/Applications/calibre.app/Contents/console.app/Contents/Resources/lib/python2.6/site-packages.zip/calibre/parallel.py", line 915, in work
res = func(*args, **kargs)
File "/Applications/calibre.app/Contents/console.app/Contents/Resources/lib/python2.6/site-packages.zip/calibre/ebooks/mobi/from_feeds.py", line 69, in main
convert(opts, recipe_arg, notification=notification)
File "/Applications/calibre.app/Contents/console.app/Contents/Resources/lib/python2.6/site-packages.zip/calibre/ebooks/mobi/from_feeds.py", line 42, in convert
recipe = run_recipe(opts, recipe_arg, parser, notification=notification)
File "/Applications/calibre.app/Contents/console.app/Contents/Resources/lib/python2.6/site-packages.zip/calibre/web/feeds/main.py", line 148, in run_recipe
recipe = recipe(opts, parser, notification)
File "calibre/web/feeds/news.pyo", line 481, in __init__
File "/var/folders/Rj/RjcFHDS5HvWw9Jm-ZeDZck+++TI/-Tmp-/calibre_0.4.141_EYtRKv_recipes/recipe0.py", line 14, in get_browser
File "mechanize/_mechanize.pyo", line 530, in select_form
FormNotFoundError: no form matching name 'form_id'

**Log**:
('FormNotFoundError', u"no form matching name 'form_id'")
Traceback (most recent call last):
File "/Applications/calibre.app/Contents/console.app/Contents/Resources/lib/python2.6/site-packages.zip/calibre/parallel.py", line 957, in worker
result = work(client_socket, func, args, kwdargs)
File "/Applications/calibre.app/Contents/console.app/Contents/Resources/lib/python2.6/site-packages.zip/calibre/parallel.py", line 915, in work
res = func(*args, **kargs)
File "/Applications/calibre.app/Contents/console.app/Contents/Resources/lib/python2.6/site-packages.zip/calibre/ebooks/mobi/from_feeds.py", line 69, in main
convert(opts, recipe_arg, notification=notification)
File "/Applications/calibre.app/Contents/console.app/Contents/Resources/lib/python2.6/site-packages.zip/calibre/ebooks/mobi/from_feeds.py", line 42, in convert
recipe = run_recipe(opts, recipe_arg, parser, notification=notification)
File "/Applications/calibre.app/Contents/console.app/Contents/Resources/lib/python2.6/site-packages.zip/calibre/web/feeds/main.py", line 148, in run_recipe
recipe = recipe(opts, parser, notification)
File "calibre/web/feeds/news.pyo", line 481, in __init__
File "/var/folders/Rj/RjcFHDS5HvWw9Jm-ZeDZck+++TI/-Tmp-/calibre_0.4.141_EYtRKv_recipes/recipe0.py", line 14, in get_browser
File "mechanize/_mechanize.pyo", line 530, in select_form
FormNotFoundError: no form matching name 'form_id'
Recipe used:

Code:
class AdvancedUserRecipe1235882735(BasicNewsRecipe):
    title          = u'Stratfor'
    needs_subscription = True
    oldest_article = 1
    max_articles_per_feed = 100

    def get_browser(self):
        br = BasicNewsRecipe.get_browser()
        if self.username is not None and self.password is not None:
            br.open('http://www.stratfor.com/')
            br.select_form(name='form_id')
            br['name']   = self.username
            br['pass'] = self.password
            br.submit()
        return br
    
    feeds          = [(u'Australia/Ocenia', u'https://www.stratfor.com/user/342290/feed/22419/32ab9ee40cc123deccf8e7725f969b9ad6244fda'), (u'Economics/Trade', u'https://www.stratfor.com/user/342290/feed/22376/dc312596cb508fa9bb064338b4a323da07282b64')]
Solari is offline   Reply With Quote