Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 03-01-2009, 12:23 AM   #1
Solari
Nameless Being
 
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')]
  Reply With Quote
Old 03-01-2009, 04:31 PM   #2
Solari
Nameless Being
 
Anyone able to help out here? Thanks.

Ray
  Reply With Quote
Advert
Old 03-01-2009, 04:51 PM   #3
kiklop74
Guru
kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.
 
kiklop74's Avatar
 
Posts: 800
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle Voyage
Your form name is incorrect which is clearly visible from your error log:

Code:
**Log**:
('FormNotFoundError', u"no form matching name 'form_id'")
The login form on stratfor.com does not have attribute name so you can not use that form of select_form method. You should use select by order number:

Code:
br.select_form(nr=1)
Test the value of nr until you get it working.
kiklop74 is offline   Reply With Quote
Old 03-01-2009, 07:04 PM   #4
Solari
Nameless Being
 
Thanks! I got it working, but had to start with 0 instead of 1, thinking in computer terms. That did the trick.

Thanks,
Ray
  Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can someone identify this e-reader? handisnacks Which one should I buy? 15 10-13-2010 01:09 AM
DR800 can someone help me to identify the error of the script? tigerszheng iRex 5 08-15-2010 08:06 AM
Please help me identify manufacturer/device! rgeorg More E-Book Readers 3 03-16-2010 01:46 PM
isbndb.com - Where to enter user/pass? Starson17 Calibre 2 12-22-2009 10:19 AM
Help Me Identify A Title, Please MV64 Reading Recommendations 2 04-24-2009 10:21 AM


All times are GMT -4. The time now is 06:18 AM.


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