limkokhole / pinterest-downloader

Download all images/videos from Pinterest user/board/section.
MIT License
282 stars 47 forks source link

Error downloading a board #6

Closed Fennecai closed 2 years ago

Fennecai commented 3 years ago
Traceback (most recent call last):
  File "pinterest-downloader.py", line 1158, in main
    board, sections = get_board_info(board_path, False, None, proxies)
  File "pinterest-downloader.py", line 285, in get_board_info
    for i in initial_data['resourceResponses']:
KeyError: 'resourceResponses'
 Abort.

im trying to download all my pins: https://www.pinterest.com/1995aek/_saved/

it runs into a problem with my "inspiration" board, where all the images are in sub-sections.

Mist-Hunter commented 3 years ago

Getting same issue, even with default example

cbrahms commented 2 years ago

It seems if a board contains one or more sections it will fail, even when passing -es to exclude sections.

✗ python3 pinterest-downloader.py -bt -d ~/pictures/pinterest https://www.pinterest.com/1995aek/inspiration -es
[i] Job is download single board by username/boardname: 1995aek/inspiration
Traceback (most recent call last):
  File "pinterest-downloader.py", line 1180, in <module>
    main()
  File "pinterest-downloader.py", line 1111, in main
    board, sections = get_board_info(board_path, args.exclude_section, None, proxies)
  File "pinterest-downloader.py", line 263, in get_board_info
    tag = root.xpath("//script[@id='initial-state']")[0]
IndexError: list index out of range
 Abort.

Did anyone find a solution or a way to exclude the sections?

sachinprabhu007 commented 2 years ago

Hello

I tried to debug it and see what's happening under the hood. Leads to following error when i ran the eg

python3 pinterest-downloader.py -d comp https://www.pinterest.com/antonellomiglio/computer/

len is 2 board path antonellomiglio/computer [i] Job is download single board by username/boardname: antonellomiglio/computer ['antonellomiglio', 'computer'] antonellomiglio Traceback (most recent call last): File "pinterest-downloader.py", line 1188, in <module> main() File "pinterest-downloader.py", line 1119, in main board, sections = get_board_info(board_path, args.exclude_section, None, proxies) File "pinterest-downloader.py", line 264, in get_board_info tag = root.xpath("//script[@id='initial-state']")[0] IndexError: list index out of range Abort.

limkokhole commented 2 years ago

Sorry for long wait, new layout fixed.