Where have I gone? (Creating an application)
I have not been here for a long time, as well as on civitai, I began to rarely publish anything. The reason for this is the creation of an application. I've been working on it for 9 hours a day every day for a week now, and since I'm not a programmer, this is a new experience for me and I'm proud of what I've already done. Today I want to share with you my idea and tell you about what is already working well in my program.
Initially, my idea was to create a script that would collect images of various artists for me, assemble them into a competent structure, automatically deleting text from them and describing them for SD.
Script logic:
1. "get_artist_list" - Parsing the list of artists from the Joyreactor website into files Artists_1.txt , _2, and so on up to 20 files with 500 entries each. From which, in the future, the name (URL) of the artist will be randomly taken for our needs. There is also a "check_and_update_artist_files" method - If files and names in them (500 in each) exist and are unique, this parsing is skipped.
2. "get_random_artist_from_multiple_files" is a method for randomly selecting an artist from 20 files. (perhaps I will change this decision in the future).
3. "get_last_page_number" - Parsing the number of images on the pages of this artist. Joyreactor has a very unusual page logic. The first page of the artist is the last, and in order to determine the next page, I had to create logic to determine the penultimate page of the artist, because there are more recent images on it. In the output, we get (number) - the number of images of this artist.
3. "get_artist_preview_images" - Preview parsing. First, the number of pages is determined according to the last stage and previews are parsed from the last to the first (this logic implies loading incomplete images into the cache so that I can look and understand whether I need images of this artist or choose another one. There are no "thumbnail" files on the site, so the ones that we usually see when the page loads are loaded).