mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2026-05-08 12:36:11 +02:00
adapter_storiesonlinenet(et al): Add always_login option. Closes #1185
This commit is contained in:
parent
21483f7227
commit
d77cc15586
4 changed files with 35 additions and 1 deletions
|
|
@ -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 %%.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
|
|
|
|||
|
|
@ -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 %%.
|
||||
|
|
|
|||
Loading…
Reference in a new issue