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

Some RCO Suggestions #327

Open
BarneyTheCantankerous opened this issue Oct 5, 2022 · 3 comments
Open

Some RCO Suggestions #327

BarneyTheCantankerous opened this issue Oct 5, 2022 · 3 comments

Comments

@BarneyTheCantankerous
Copy link

BarneyTheCantankerous commented Oct 5, 2022

I'm having some issues with git locally so couldn't raise a PR but I've got a couple of suggestions which might tighten up the support around RCO...

Looks like some comic issues use single quotes, so need to include support for both:

img_list = re.findall(r"lstImages.push\(\"(.*?)\"\);", str(source))

img_list = re.findall(r"lstImages.push\([\"\'](.*?)[\"\']\);", str(source))

Before I found your project one issue I was running into with my own implementation, it could just be that I've missed something in your code, I think you might need to include support for decoding the page from br. Here's a really rough and dirty example of something I made for the thing I was working on prior:

def decode_page(page):
    encoding = page.headers.get('content-encoding', '').lower()
    if encoding == 'br':
        return brotli.decompress(page.read())
    elif encoding == 'gzip':
        return gzip.decompress(page.read());

All of that said, whatever mechanism they're using to scramble the image URLs it looks like the get_image_links might be out of date now as I wasn't able to unscramble a couple I tested.

@Xonshiz
Copy link
Owner

Xonshiz commented Oct 6, 2022

Hey Barney, I never came across the single quote list. That's interesting.
Could you please share some of those links? I could try to look into it in a few weeks when I get some time.
Thanks for looking into it and for the suggestions, appreciate it.

@BarneyTheCantankerous
Copy link
Author

@Xonshiz
Copy link
Owner

Xonshiz commented Oct 7, 2022

Amazing, thanks. I'll try to check it out in few weeks.

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

No branches or pull requests

2 participants