QIN2DIM / istockphoto

📸 Gracefully download dataset from iStockPhoto.
Apache License 2.0
13 stars 2 forks source link

Help me #1

Closed Nickyg001 closed 1 year ago

Nickyg001 commented 1 year ago

in VSC use this code:

from istockphoto import IstockPhotoDownloader
if __name__ == '__main__':
    IstockPhotoDownloader("house").mining()

Terminal Respose:

2023-02-17 12:40:27 | DEBUG - Init workers session
2023-02-17 12:40:27 | DEBUG - Container preload - phrase=house
2023-02-17 12:40:27 | DEBUG - Setup [iStock] - power=1 pages=1
2023-02-17 12:40:28 | DEBUG - Get image url - progress=[1/1] src=https://www.istockphoto.com/search/2/image?phrase=house&mediatype=photography&numberofpeople=none&orientations=square&page=1
Traceback (most recent call last):
  File "src\\gevent\\greenlet.py", line 906, in gevent._gevent_cgreenlet.Greenlet.run
  File "C:\Users\nicky\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\istockphoto\core.py", line 243, in _adaptor
    self.download_image(url)
  File "C:\Users\nicky\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\istockphoto\core.py", line 266, in download_image
    with open(fp, "wb") as file:
FileNotFoundError: [Errno 2] No such file or directory: '/1306490623/it/foto/blank-semplice-display-house-box-stand-isolato-su-sfondo-colore-pastello-rosa-minimo.jpg.jpg'
2023-02-17T11:40:28Z <Greenlet at 0x171bff80ca0: <bound method IstockPhotoDownloader._adaptor of <istockphoto.core.IstockPhotoDownloader object at 0x00000171BD207D60>>> failed with FileNotFoundError

2023-02-17 12:40:28 | SUCCESS - Task complete - offload=C:\Users\nicky\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\istockphoto\istock_dataset\house

I can generate the search link (with the defaults parameters) to the Istock site... https://www.istockphoto.com/search/2/image?phrase=house&mediatype=photography&numberofpeople=none&orientations=square&page=1 but it doesn't generate any file for download.

I still haven't figured out if this script is used to download photos or to generate a search from the terminal to the website. If it is possible to download could I understand how to do it? Thank you.

QIN2DIM commented 1 year ago

It looks like the interface parameters have changed. Let me adjust it.

Nickyg001 commented 1 year ago

I sent you an email on google.

QIN2DIM commented 1 year ago

I got it

hzlbbfrog commented 9 months ago

Hello, Nicky. I want to ask if you can still download images from iStock. I face the same question.o(╥﹏╥)o. Could you tell me how to solve this? Thanks so much!