adapter_storiesonlinenet(et al): Add always_login option. Closes #1185

This commit is contained in:
Jim Miller 2025-03-29 17:16:08 -05:00
parent 21483f7227
commit d77cc15586
4 changed files with 35 additions and 1 deletions

View file

@ -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 %%.

View file

@ -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

View file

@ -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),

View file

@ -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 %%.