Browse Source

Handle URLs with queries and fragments

tags/v1.0
JustAnotherArchivist 1 year ago
parent
commit
47fe0a4e70
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      codearchiver/core.py

+ 2
- 1
codearchiver/core.py View File

@@ -383,7 +383,8 @@ class Module(metaclass = ModuleMeta):
self._storage = storage
self._id = id_
if self._id is None and type(self).name is not None:
self._id = f'{type(self).name}_{self._url.replace("/", "_")}_{datetime.datetime.utcnow():%Y%m%dT%H%M%SZ}'
mangledUrl = self._url.replace('/', '_').replace('?', '_').replace('&', '_').replace('#', '_')
self._id = f'{type(self).name}_{mangledUrl}_{datetime.datetime.utcnow():%Y%m%dT%H%M%SZ}'
self._httpClient = HttpClient()

@abc.abstractmethod


Loading…
Cancel
Save