diff --git a/calibre-plugin/plugin-defaults.ini b/calibre-plugin/plugin-defaults.ini index c643d0f7..baf3a7b1 100644 --- a/calibre-plugin/plugin-defaults.ini +++ b/calibre-plugin/plugin-defaults.ini @@ -2117,6 +2117,11 @@ use_basic_cache:true #username:youremail@yourdomain.dom #password:yourpassword +## In order to see some protected stories, login is required, +## but not indicated anyway we can detect. Requires valid +## username and password when true. +#always_login:true + ## dateUpdated/datePublished don't usually have time, but they do on this site. ## http://docs.python.org/library/datetime.html#strftime-strptime-behavior ## Note that ini format requires % to be escaped as %%. @@ -2488,6 +2493,11 @@ use_basic_cache:true #username:youremail@yourdomain.dom #password:yourpassword +## In order to see some protected stories, login is required, +## but not indicated anyway we can detect. Requires valid +## username and password when true. +#always_login:true + ## dateUpdated/datePublished don't usually have time, but they do on this site. ## http://docs.python.org/library/datetime.html#strftime-strptime-behavior ## Note that ini format requires % to be escaped as %%. @@ -2749,6 +2759,11 @@ slow_down_sleep_time:1 #username:youremail@yourdomain.dom #password:yourpassword +## In order to see some protected stories, login is required, +## but not indicated anyway we can detect. Requires valid +## username and password when true. +#always_login:true + ## dateUpdated/datePublished don't usually have time, but they do on this site. ## http://docs.python.org/library/datetime.html#strftime-strptime-behavior ## Note that ini format requires % to be escaped as %%. diff --git a/fanficfare/adapters/adapter_storiesonlinenet.py b/fanficfare/adapters/adapter_storiesonlinenet.py index 4b981874..dcfd8c7c 100644 --- a/fanficfare/adapters/adapter_storiesonlinenet.py +++ b/fanficfare/adapters/adapter_storiesonlinenet.py @@ -173,6 +173,10 @@ class StoriesOnlineNetAdapter(BaseSiteAdapter): url = self.url logger.debug("URL: "+url) + ## Some stories give 404 if not logged in now. See #1185 + if self.getConfig("always_login"): + self.performLogin(self.url) + ## Hit story URL to check for changed title part -- if the ## title has changed or (more likely?) the ID number has ## been reassigned to a different title, this will 404 diff --git a/fanficfare/configurable.py b/fanficfare/configurable.py index b2c34c4b..8a1fcfe3 100644 --- a/fanficfare/configurable.py +++ b/fanficfare/configurable.py @@ -242,7 +242,7 @@ def get_valid_set_options(): 'scrape_bookshelf':(['fimfiction.net'],None,boollist+['legacy']), 'include_author_notes':(['fimfiction.net','readonlymind.com','royalroad.com','syosetu.com'],None,boollist), 'do_update_hook':(otw_list,None,boollist), - 'always_login':(['syosetu.com','fimfiction.net','inkbunny.net']+otw_list+base_xenforo_list,None,boollist), + 'always_login':(['syosetu.com','fimfiction.net','inkbunny.net']+otw_list+base_xenforo_list+wpc_list,None,boollist), 'use_archived_author':(otw_list,None,boollist), 'use_view_full_work':(otw_list+['fanfics.me'],None,boollist), 'use_workskin':(otw_list,None,boollist), diff --git a/fanficfare/defaults.ini b/fanficfare/defaults.ini index b4548cd0..ff69165c 100644 --- a/fanficfare/defaults.ini +++ b/fanficfare/defaults.ini @@ -2110,6 +2110,11 @@ use_basic_cache:true #username:youremail@yourdomain.dom #password:yourpassword +## In order to see some protected stories, login is required, +## but not indicated anyway we can detect. Requires valid +## username and password when true. +#always_login:true + ## dateUpdated/datePublished don't usually have time, but they do on this site. ## http://docs.python.org/library/datetime.html#strftime-strptime-behavior ## Note that ini format requires % to be escaped as %%. @@ -2481,6 +2486,11 @@ use_basic_cache:true #username:youremail@yourdomain.dom #password:yourpassword +## In order to see some protected stories, login is required, +## but not indicated anyway we can detect. Requires valid +## username and password when true. +#always_login:true + ## dateUpdated/datePublished don't usually have time, but they do on this site. ## http://docs.python.org/library/datetime.html#strftime-strptime-behavior ## Note that ini format requires % to be escaped as %%. @@ -2742,6 +2752,11 @@ slow_down_sleep_time:1 #username:youremail@yourdomain.dom #password:yourpassword +## In order to see some protected stories, login is required, +## but not indicated anyway we can detect. Requires valid +## username and password when true. +#always_login:true + ## dateUpdated/datePublished don't usually have time, but they do on this site. ## http://docs.python.org/library/datetime.html#strftime-strptime-behavior ## Note that ini format requires % to be escaped as %%.