Giter Site home page Giter Site logo

moontai0724 / fantia-downloader Goto Github PK

View Code? Open in Web Editor NEW
9.0 2.0 4.0 11 KB

Download post contents from fantia.jp, you can take a look what I found in link below before you use this

Home Page: https://github.com/bitbybyte/fantiadl

License: MIT License

Shell 7.39% JavaScript 92.61%
fantia nodejs crowler cli downloader

fantia-downloader's Introduction

What is Fantia downloader?

Fantia, which is a platform to share photos and arts.
This downloader is for those who wants to download all medias (both image and video) that created by specific creator.

Requirements

Getting Started

To start download, following is steps:

  1. Copy .env.example to .env and configure it well.
  2. Run yarn install to install required packages.
  3. Run node . to start program.
  4. CLI will ask for first post id to start, enter first post id to start download automatically!

Note: Post ID can found in URL, for example, if URL is https://fantia.jp/posts/123456, then it should be 123456.
Note 2: There will have a cooldown between two post for avoid too many requests.

If you found that always display 0 asset to download, please make sure SESSION_ID is up-to-date (brand new).

Environment Variables

DOWNLOAD_PATH

Where downloaded files to save, both relative and absolute are acceptable.

SESSION_ID

This value is used for access member only resources.

To get this value, please follow these steps:

  1. Login to Fantia with your browser.
  2. Open DevTools in your browser, which usually can open by press F12.
  3. Switch to Network tab in DevTools, you will see network requests.
  4. Choose any request which is sent by POST method.
  5. Switch to Cookies tab, which is a sub tab of Network tab.
  6. You will find a cookie named _session_id, copy that value and paste here.

DIRECTION

Avaliable options: forward, backward.

Forward, means it will go to next post after current post downloaded (To newer post).
Backward, means it will go to previous post after current post downloaded (To older post).

Known Issues

Forbidden characters in name on windows (resolved, with side effect)

On windows, there are some characters are forbidden in a file or directory name, so I replaced them into + character.

Following characters will be replaced into + character: /, \, ?, %, *, :, |, ", <, >.

fantia-downloader's People

Contributors

dependabot[bot] avatar moontai0724 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

fantia-downloader's Issues

No... It shows "Axios Error"?

I followed every step of your turorial.
I set session ID, and first post id is also correct. But no pictures downloaded.
What? It shows "isAxiosError : true"
image

What me need to do next?

Hello. Can you explain me, what me need to do?
I downloaded nodejs and Yarn as you said. But I cant understand what me need to do now. The page says: 1. Copy .env.example to .env and configure it well. What means by ".env"? I created a folder with the same name in "nodejs" folder, where Node.exe located. But i running Node.exe, and nothing happens! Can you explain, what me need to do, to download images from Fantia? I`m a little bit noob in Programming Languages, and actually know only Python.

unhandled promise rejection warning?

UnhandledPromiseRejectionWarning: Error: Request failed with status code 404
at createError (E:\python notes\fantia-downloader-master\node_modules\axios\lib\core\createError.js:16:15)
at settle (E:\python notes\fantia-downloader-master\node_modules\axios\lib\core\settle.js:17:12)
at IncomingMessage.handleStreamEnd (E:\python notes\fantia-downloader-master\node_modules\axios\lib\adapters\http.js:269:11)
at IncomingMessage.emit (events.js:412:35)
at endReadableNT (internal/streams/readable.js:1317:12)
at processTicksAndRejections (internal/process/task_queues.js:82:21)
(Use node --trace-warnings ... to show where the warning was created)
(node:8964) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.