MissingSchema error while importing
Hi, I got this error while importing using some config:
INFO:flatisfy.filters.images:Downloading photos for flat 342/1192: appartement-paris-15e-r422202272@pap.
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/flatisfy/git/flatisfy/flatisfy/__main__.py", line 228, in <module>
main()
File "/home/flatisfy/git/flatisfy/flatisfy/__main__.py", line 214, in main
cmds.import_and_filter(config, load_from_db=False)
File "flatisfy/cmds.py", line 144, in import_and_filter
fetch_details=(not load_from_db))
File "flatisfy/cmds.py", line 122, in filter_fetched_flats
fetch_details
File "flatisfy/cmds.py", line 76, in filter_flats_list
first_pass_result["new"], constraint, config
File "flatisfy/tools.py", line 410, in wrapped
res = func(*args, **kwargs)
File "flatisfy/filters/__init__.py", line 231, in second_pass
images.download_images(flats_list, config)
File "flatisfy/filters/images.py", line 36, in download_images
image = photo_cache.get(photo["url"])
File "flatisfy/filters/cache.py", line 50, in get
item = self.map[key] = self.on_miss(key)
File "flatisfy/filters/cache.py", line 116, in on_miss
req = requests.get(url)
File "/home/flatisfy/.virtualenvs/flatisfy/local/lib/python2.7/site-packages/requests/api.py", line 72, in get
return request('get', url, params=params, **kwargs)
File "/home/flatisfy/.virtualenvs/flatisfy/local/lib/python2.7/site-packages/requests/api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "/home/flatisfy/.virtualenvs/flatisfy/local/lib/python2.7/site-packages/requests/sessions.py", line 498, in request
prep = self.prepare_request(req)
File "/home/flatisfy/.virtualenvs/flatisfy/local/lib/python2.7/site-packages/requests/sessions.py", line 441, in prepare_request
hooks=merge_hooks(request.hooks, self.hooks),
File "/home/flatisfy/.virtualenvs/flatisfy/local/lib/python2.7/site-packages/requests/models.py", line 309, in prepare
self.prepare_url(url, params)
File "/home/flatisfy/.virtualenvs/flatisfy/local/lib/python2.7/site-packages/requests/models.py", line 383, in prepare_url
raise MissingSchema(error)
requests.exceptions.MissingSchema: Invalid URL '/images/icons/miniature-video.png': No schema supplied. Perhaps you meant http:///images/icons/miniature-video.png?
I'm considering puting the line where the error happens inside the try/catch block below, but maybe we shouldn't have gotten this URL in the first place.
I believe the problem comes from this ad: https://www.pap.fr/annonces/appartement-paris-15e-r422202272 where there's a video as first image. So I'd be fine just ignoring it :-)