1
0
mirror of https://git.sr.ht/~cadence/bibliogram synced 2026-01-06 21:41:13 +00:00

Replace all profile fetching methods with IWeb

The previous HTML method is gone due to a page restructure. It was
able to consistently bypass Instagram's blocking.

The IWeb method has a few hundred uses per X time for selfhosters, and
a couple dozen uses per X time for servers. This will likely change in
the future. There is no known way to bypass Instagram's IWeb blocking.

Feel free to look for a way.

Further timeline pages are still blocked. The "next page" button
defaults to not automatically loading when scrolled, since it will
basically never work anyway. Users running personal instances may be
able to get a couple of uses out of it.
This commit is contained in:
Cadence Ember
2022-07-25 01:48:44 +12:00
parent d2665ce538
commit c2d7aca1cb
6 changed files with 53 additions and 139 deletions

View File

@@ -47,11 +47,14 @@ class NextPage extends FreezeWidth {
this.controller = controller
this.clicked = false
this.nextPageNumber = +this.element.getAttribute("data-page")
this.auto = this.element.getAttribute("data-auto")
this.attribute("href", "javascript:void(0)")
this.event("click", event => this.onClick(event))
this.observer = new IntersectionObserver(entries => this.onIntersect(entries), {rootMargin: "0px", threshold: intersectionThreshold})
this.observer.observe(this.element)
if (this.auto !== "off") {
this.observer.observe(this.element)
}
}
onClick(event) {

View File

@@ -10,6 +10,7 @@ mixin next_page_button(user, selectedTimeline, url, type)
data-username=(user.data.username)
data-type=type
data-loading-text=ll.next_page_button_loading
data-auto=settings.infinite_scroll
)#next-page.next-page= ll.next_page_button
else
div

View File

@@ -102,9 +102,8 @@ html(dir=ll.meta_direction, lang=settings.language)
+checkbox("spa", ll.fast_navigation, ll.t_enabled, false)
+select("infinite_scroll", ll.infinite_scroll, true, [
+select("infinite_scroll", ll.infinite_scroll, false, [
{value: "normal", text: ll.t_normal},
{value: "eager", text: ll.t_eager},
{value: "off", text: ll.t_manual}
])