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 10-10-2013, 10:57 PM   #1
tmizukami
Junior Member
tmizukami began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Oct 2013
Device: kindle paperwhite
Recipe for Foresight(Japanese)

I would like to download the membership next news, but fails to login.
Could you advice?

<News Site>
http://www.fsight.jp/21383

<Recipe I tried>
class AdvancedUserRecipe1380971374(BasicNewsRecipe):
title = u'Foresight'
language = 'ja'
needs_subscription = True
oldest_article = 30
max_articles_per_feed = 100
no_stylesheets = True
auto_cleanup = True

feeds = [(u'Foresight', u'http://fullrss.net/a/http/www.fsight.jp/feed')]

def get_browser(self):
html = '''<form id="mylogin-login-form" action="https://www.fsight.jp/login" method="POST">
<input id="txt_log" name="log" type="text" title="ユーザー名" placeholder="ユーザー名" />
<input id="pwd_pwd" name="pwd" type="password" title="パスワード" placeholder="パスワード" />
<input id="chk_rememberme" name="rememberme" type="checkbox" />
</form>
'''
br = BasicNewsRecipe.get_browser(self)
if self.username is not None and self.password is not None:
br.open('https://www.fsight.jp/login?redirect_to=http://www.fsight.jp/')
response = br.response()
response.set_data(html)
br.set_response(response)
br.select_form(nr=0)
br["log"] = self.username
br['pwd'] = self.password
br.submit()
return br
tmizukami is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PRS-T2 Anyone with a Japanese T2? ebmr Sony Reader 1 10-21-2012 07:34 PM
Recipe for Japanese FunFiction Site "Arcadia" masahase Recipes 0 08-27-2012 01:00 PM
PRS-T1 PRS-T1 Japanese version have japanese-english dic in it? nukito Sony Reader 2 06-14-2012 02:37 PM
Recipe works when mocked up as Python file, fails when converted to Recipe ode Recipes 7 09-04-2011 04:57 AM
PRS-600 Japanese support sebasdoes Sony Reader 0 07-10-2010 10:40 AM


All times are GMT -4. The time now is 03:08 AM.


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