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

Is it possible to download images from asianfanfics? #1143

Open
burnacacc700 opened this issue Jan 10, 2025 · 11 comments
Open

Is it possible to download images from asianfanfics? #1143

burnacacc700 opened this issue Jan 10, 2025 · 11 comments

Comments

@burnacacc700
Copy link

Hi, I am new to FFF, I would like to download the images with the stories.

tried a few options like

include_images:true
force_img_self_referer_regexp:https://photo.asianfanfics.com|asianfanfics.com
force_img_self_referer:true

and it doesnt seem to help.

Is it possible? story itself downloads fine

@JimmXinu
Copy link
Owner

Can you provide a couple story URLs (SFW please) with images that aren't downloading?

@burnacacc700
Copy link
Author

story 1

story 2

second story is actually just a bunch of pics rather than a story, i thought that would be a good test.

@JimmXinu
Copy link
Owner

In theory, yes. But some image hosting sites deliberately making it very difficult or functionally impossible.

I didn't see any images in the text of the first story, just the cover image which the site repeats on each chapter, but FFF uses only as the initial cover. Download fine for me.

In the second story, the majority of the fails (in the first chapter at least--that's a lot of images by itself) are from tumblr. Instead of serving the image, they're giving an HTML page that in turn links to the image. Not uncommon.

  • Changing the image URL to be the one from the HTML image page also gets the HTML page, so it's more complicated than that.

  • We already have to have use_cloudscraper:true for asianfanfics to work at all, which sets User-Agent.

  • Setting force_img_self_referer_regexp:gelbooru.com|photobucket.com|tumblr.com to force the Referer to be the same URL as the image doesn't work with these.

  • When requested in browser from the asianfanfics page, tumblr instead sends back a 301 redirect a (slightly) different URL that does serve the page. Attempting to use that URL from FFF has the same result--HTML, not image.

At this point, I would give up, except the curl command line tool does work. I will spend some more time thinking about this.

@burnacacc700
Copy link
Author

burnacacc700 commented Jan 12, 2025

Is it possible to have the first story get all the images? I get it's not very useful for that particular story, but there are others with "photos.asianfanfics" hosted images within the stories/ at each chapter.

Edit: As for the tumblr images, theoretically could a stop gap solution be, somehow extracting the links and then running through, say gallery-dl or some other software? Ideally I'd like them together of course but if that's not possible, at least this way the images will be saved.

@JimmXinu
Copy link
Owner

Like I said, I didn't see any images in the text of the first story--just the repeated cover image.

Can you show a screen shot, or provide a chapter and the text above and below an image?

@burnacacc700
Copy link
Author

Apologies. I meant the repeated cover image, Is it possible to have it at each chapter. Most of the photos I need are at the start of the chapter, I tried to look for better examples which used all photo.asianfanfics but they were not exactly sfw.

@burnacacc700
Copy link
Author

I have tested a few other fics, and it seems it only gets the cover regardless of hosts.

@JimmXinu
Copy link
Owner

Are you saying that image can be different for different chapters?

Or you just want that same image included in every chapter?

A few NSFW links are okay if that's all you can find.

@burnacacc700
Copy link
Author

burnacacc700 commented Jan 12, 2025

Both?

For ones that repeat like story 2, I’d ideally like them to be at the start of each chapter. not just the title

Story 3, and others can have different images at the start of each chapter, but it still only gets the title image.

For story 2 since it can get the image for the title, I guess i’m wondering why it can’t for the inner chapters.

Some of the chapters in story 3 are not sfw, if you want to avoid it jump to chapter 2.

To simplify my question, can it get story 3, chapter 2’s image with the story? hosted on photo.asianfanfics.
Story 3

@burnacacc700
Copy link
Author

One more point of reference, Chapters 1-3 and 32-39 are safe. All images are hosted on imgur, only title image downloads.

story 4

@JimmXinu
Copy link
Owner

I didn't originally write the adapter for this site, nor do I read it. So I never questioned the assumption that it was the same image all the time.

Since the chapters have different images, we should be including them. Perhaps with an optional setting like inject_chapter_title, except defaulting to 'true'?

@oh45454545, do you have time and/or interest to look into this?

As for imgur images, it may turn out to be the same as tumblr and this prior issue.

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

2 participants