mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2026-01-03 06:34:04 +01:00
Add/Update some comments to rikkitp's changes.
This commit is contained in:
parent
535451cfa0
commit
a6c551ee1b
4 changed files with 8 additions and 2 deletions
|
|
@ -1,5 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2017 FanFicFare team
|
||||
# Copyright 2018 FanFicFare team
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright 2014 Fanficdownloader team, 2017 FanFicFare team
|
||||
# Copyright 2014 Fanficdownloader team, 2018 FanFicFare team
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@ from datetime import datetime, timedelta
|
|||
|
||||
UNIX_EPOCHE = datetime.fromtimestamp(0)
|
||||
|
||||
## Currently used by adapter_webnovelcom & adapter_wwwnovelallcom
|
||||
|
||||
def parse_relative_date_string(string_):
|
||||
# Keep this explicit instead of replacing parentheses in case we discover a format that is not so easily
|
||||
# translated as a keyword-argument to timedelta. In practice I have only observed hours, weeks and days
|
||||
|
|
|
|||
|
|
@ -119,6 +119,10 @@ def removeEntities(text):
|
|||
# < < and & are the only html entities allowed in xhtml, put those back.
|
||||
return text.replace('&', '&').replace('&lt', '<').replace('&gt', '>')
|
||||
|
||||
## Currently used(optionally) by adapter_lightnovelgatecom and
|
||||
## adapter_wwwnovelallcom only. I hesitate to put the option in
|
||||
## base_adapter.make_soup for all adapters due to concerns about it
|
||||
## maybe breaking metadata parsing as it changes tags.
|
||||
def fix_excess_space(text):
|
||||
# For easier extra space removing (when combining p an br)
|
||||
text = removeEntities(text)
|
||||
|
|
|
|||
Loading…
Reference in a new issue