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

FANBOX posts without cover image now completely break downloader (only on master) #953

Closed
3 tasks done
somebody1234 opened this issue May 20, 2021 · 6 comments
Closed
3 tasks done

Comments

@somebody1234
Copy link

Prerequisites

Description

See title.

this is the line creating the issue.

if not self.coverImageUrl and coverUrl:

i'd advise changing the default to None here:
coverImageUrl = ""

Steps to Reproduce

  1. Try to download FANBOX artist with a post without cover iamge

Expected behavior: No error

Actual behavior: Error

Versions

Master (7feb27d) and newer

@Nandaka
Copy link
Owner

Nandaka commented May 20, 2021

most likely due to changes in #951 @bluerthanever

@somebody1234 do you have the sample post id and the error message?

@bluerthanever
Copy link
Contributor

sorry i wanted to test with posts without cover but i didn't find any... i will have a look at it

@somebody1234
Copy link
Author

this one maybe? as sample post

@somebody1234
Copy link
Author

error message:

Traceback (most recent call last):
  File "/mnt/ntfs/MEGA/pixivutil20200827-beta1/PixivUtil2/PixivDownloadHandler.py", line 78, in download_image
    remote_file_size = get_remote_filesize(url, referer, config, notifier)
  File "/mnt/ntfs/MEGA/pixivutil20200827-beta1/PixivUtil2/PixivDownloadHandler.py", line 294, in get_remote_filesize
    res = br.open_novisit(req)
  File "/home/me/.local/lib/python3.9/site-packages/mechanize/_mechanize.py", line 241, in open_novisit
    return self._mech_open(
  File "/home/me/.local/lib/python3.9/site-packages/mechanize/_mechanize.py", line 287, in _mech_open
    response = UserAgentBase.open(self, request, data)
  File "/home/me/.local/lib/python3.9/site-packages/mechanize/_opener.py", line 173, in open
    req_scheme = req.get_type()
  File "/home/me/.local/lib/python3.9/site-packages/mechanize/_urllib2_fork.py", line 260, in get_type
    raise ValueError("unknown url type: %s" % self.__original)
ValueError: unknown url type:
Error at download_image(): (<class 'ValueError'>, ValueError('unknown url type: '), <traceback object at 0x7f79154d2a40>) at  (9000)

@somebody1234
Copy link
Author

most likely due to changes in #951

@Nandaka yes, the blame says so as well

@Nandaka
Copy link
Owner

Nandaka commented May 21, 2021

changes merged

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

3 participants