Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 12-23-2012, 01:00 AM   #1
adonishi
Junior Member
adonishi began at the beginning.
 
Posts: 7
Karma: 10
Join Date: May 2011
Device: kindle, SONY T1
nikkei_news update.

this is update for nikkei_new.
(patch here. whole recipe is attached)
Code:
--- nikkei_news.recipe-	2012-12-23 13:46:05.000000000 +0900
+++ nikkei_news.recipe	2012-12-23 13:47:16.000000000 +0900
@@ -13,8 +13,11 @@
     max_articles_per_feed = 30
     language        = 'ja'
     no_stylesheets  = True
-    cover_url       = 'http://parts.nikkei.com/parts/ds/images/common/logo_r1.svg'
-    masthead_url    = 'http://parts.nikkei.com/parts/ds/images/common/logo_r1.svg'
+    #cover_url       = 'http://parts.nikkei.com/parts/ds/images/common/logo_r1.svg'
+    cover_url       = 'http://cdn.nikkei.co.jp/parts/ds/images/common/st_nikkei_r1_20101003_1.gif'
+    #masthead_url    = 'http://parts.nikkei.com/parts/ds/images/common/logo_r1.svg'
+    masthead_url    = 'http://cdn.nikkei.co.jp/parts/ds/images/common/st_nikkei_r1_20101003_1.gif'
+    cover_margins   = (10, 188, '#ffffff')
 
     remove_tags_before = {'class':"cmn-indent"}
     remove_tags = [
@@ -40,8 +43,11 @@
             print "-------------------------open top page-------------------------------------"
             br.open('http://www.nikkei.com/')
             print "-------------------------open first login form-----------------------------"
-            link = br.links(url_regex="www.nikkei.com/etc/accounts/login").next()
-            br.follow_link(link)
+            try: 
+                url = br.links(url_regex="www.nikkei.com/etc/accounts/login").next().url
+            except StopIteration:
+                url = 'http://www.nikkei.com/etc/accounts/login?dps=3&pageflag=top&url=http%3A%2F%2Fwww.nikkei.com%2F'
+            br.open(url)     #br.follow_link(link)
             #response = br.response()
             #print response.get_data()
             print "-------------------------JS redirect(send autoPostForm)--------------------"
Attached Files
File Type: zip nikkei_news.recipe.zip (1.6 KB, 36 views)
adonishi is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
won't update...after completing the update cycle edge returns to the first screen WeAreBorrg enTourage Archive 2 03-18-2011 07:39 PM
How can I update creation time for a title when I update the book info or convert it setherd Calibre 3 10-30-2010 02:51 PM
Firmware Update Can I reinstall the official amazon update after the update file from this site ? yuenslhk Amazon Kindle 2 06-20-2010 12:24 PM
Update on Google eBook Sales Plan Update poohbear_nc News 6 05-05-2010 10:00 AM
PRS-500 What file to change to re-update reader with latest update? pitolee Sony Reader Dev Corner 2 05-25-2007 12:56 AM


All times are GMT -4. The time now is 12:32 AM.


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