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

[rule34hentai] add support #4945

Merged
merged 2 commits into from
Dec 21, 2023
Merged

[rule34hentai] add support #4945

merged 2 commits into from
Dec 21, 2023

Conversation

bun-dev
Copy link
Contributor

@bun-dev bun-dev commented Dec 17, 2023

updates shimme2.py to allow rule34hentai support. a seperate _posts_rule34hentai function was needed since the base extractor method for posts does not work with it.

bun-dev and others added 2 commits December 21, 2023 23:00
- Add files via upload
- Update shimmie2.py
- Update shimme2.py
- Delete gallery_dl/extractor/shimme2.py
- spacefix
- Update shimmie2.py
- Update shimmie2.py
- flask warnings1
- Update shimmie2.py
- Update shimmie2.py
- fix using 'self._posts_rule34hentai'
- fix 'file_url' for posts
- update docs/supportedsites
- add tests
@mikf mikf merged commit 01bb75f into mikf:master Dec 21, 2023
9 checks passed
@AlttiRi
Copy link

AlttiRi commented Dec 28, 2023

BTW, for posts with unapproved tags (with no tags visible) you can use "tag_history" page to get the tags added by the uploader.

const post_id = location.pathname.match(/\d+/)[0]; // "/post/view/123456"
const doc = await fetchDocument("https://rule34hentai.net/tag_history/" + post_id);
const tags = doc.querySelector("#Tag_Historymain > div > div > form > ul span")
    .innerText
    .replaceAll("\n", " ")
    .trim();
console.log(tags);

async function fetchDocument(url) {
    const html = await fetch(url).then(response => response.text());
    return new DOMParser().parseFromString(html, "text/html");
}

To highlight them on the main page:

[...document.querySelectorAll(`a[data-tags=""]`)].map(a => {
    a.style.backgroundColor = "#00bcd4b3";
    a.querySelector("img").style.backgroundColor = "#00bcd4b3";    
});

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

Successfully merging this pull request may close these issues.

3 participants