Ausgabe der neuen DB Einträge
This commit is contained in:
parent
bad48e1627
commit
cfbbb9ee3d
2399 changed files with 843193 additions and 43 deletions
16
venv/lib/python3.9/site-packages/scrapy/utils/httpobj.py
Normal file
16
venv/lib/python3.9/site-packages/scrapy/utils/httpobj.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
"""Helper functions for scrapy.http objects (Request, Response)"""
|
||||
|
||||
import weakref
|
||||
from urllib.parse import urlparse
|
||||
|
||||
|
||||
_urlparse_cache = weakref.WeakKeyDictionary()
|
||||
|
||||
|
||||
def urlparse_cached(request_or_response):
|
||||
"""Return urlparse.urlparse caching the result, where the argument can be a
|
||||
Request or Response object
|
||||
"""
|
||||
if request_or_response not in _urlparse_cache:
|
||||
_urlparse_cache[request_or_response] = urlparse(request_or_response.url)
|
||||
return _urlparse_cache[request_or_response]
|
||||
Loading…
Add table
Add a link
Reference in a new issue