Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot download files due to keyerror #8

Open
goldenagent100 opened this issue Jan 14, 2020 · 6 comments
Open

Cannot download files due to keyerror #8

goldenagent100 opened this issue Jan 14, 2020 · 6 comments

Comments

@goldenagent100
Copy link

I tried to download the same 2 users in the provided config to test the program, but it failed.

I have included the error and stack trace.

C:\Users\User1\AppData\Local\Programs\Python\Python38\python.exe D:/Documents/code/deviantart-scraper/main.py artwork

there are 2 users

download artworks for user GUWEIZ

Traceback (most recent call last):
  File "D:/Documents/code/deviantart-scraper/main.py", line 54, in <module>
    main()
  File "D:/Documents/code/deviantart-scraper/main.py", line 40, in main
    download_users(api, config, args.option)
  File "D:/Documents/code/deviantart-scraper/main.py", line 11, in download_users
    result = api.save_users_artworks(config.users, config.save_dir)
  File "D:\Documents\code\deviantart-scraper\lib\deviantart.py", line 204, in save_users_artworks
    files = self.save_user_artworks(user, dir_path)
  File "D:\Documents\code\deviantart-scraper\lib\deviantart.py", line 180, in save_user_artworks
    files = pool.map(partial(self.save_artwork, dir_path), artworks)
  File "C:\Users\User1\AppData\Local\Programs\Python\Python38\lib\multiprocessing\pool.py", line 364, in map
    return self._map_async(func, iterable, mapstar, chunksize).get()
  File "C:\Users\User1\AppData\Local\Programs\Python\Python38\lib\multiprocessing\pool.py", line 768, in get
    raise self._value
  File "C:\Users\User1\AppData\Local\Programs\Python\Python38\lib\multiprocessing\pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
  File "C:\Users\User1\AppData\Local\Programs\Python\Python38\lib\multiprocessing\pool.py", line 48, in mapstar
    return list(map(*args))
  File "D:\Documents\code\deviantart-scraper\lib\deviantart.py", line 154, in save_artwork
    download_url = self._download_url(artwork)
  File "D:\Documents\code\deviantart-scraper\lib\deviantart.py", line 111, in _download_url
    url = next(a['src'] for a in artwork['files'] if a['type']=='fullview')
KeyError: 'files'
python version: Python 3.8.1
windows version: Windows 10 Home
@MeKHell
Copy link

MeKHell commented Feb 12, 2020

Hey, I get exactly the same error on an other user (Ellysiumn).

@Alex1331xela
Copy link

Same issue here

@wynstep
Copy link

wynstep commented Feb 27, 2020

Hey, I get exactly the same error on an other user (Ellysiumn).

Same issue here, with exactly the same user. Any suggestion?

@YichSouls
Copy link

I think the site has changed the layout thus the error. Can only wait for the update

@mitar
Copy link

mitar commented Nov 6, 2021

I made this MR: #12 but I think it is best to simply use https://github.com/mikf/gallery-dl, which seems to work.

@goldenagent100
Copy link
Author

Thank for the recommendation @mitar, gallery-dl works for many galleries

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants