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

Add an option to detect the last page and then stop appending (e.g. duplicate pages) #81

Open
1 task done
poa00 opened this issue Jan 20, 2024 · 2 comments
Open
1 task done
Assignees

Comments

@poa00
Copy link

poa00 commented Jan 20, 2024

Problem

I think it's safe to assume that this is a bug and not user error as I am using the start=0&view=print regex snippet that you personally drafted up for me as a solution to my dilemma (where the start=## portion of the URL was absent from the first page, only appearing on the second page of each forum thread).

Using the saved settings you provided, regardless of the length of a given thread, if I continue scrolling to the bottom, rather than actually reaching the end of the thread, I find Infy-Scroll living up to its name: it makes every webpage an infinite amount of pages!

URL

www.autohotkey.com/boards/viewtopic.php?f=6&t=45307&start=0&view=print

Version

0.8

Browser

Microsoft Edge for Business Version 120.0.2210.144 (Official build) (64-bit)

OS

Windows 11 Enterprise

Device

PC

Adherence

  • I have read the Sticky and my issue is directly related with the app and is not related to making it work with a specific website
@sixcious sixcious self-assigned this Jan 21, 2024
@sixcious
Copy link
Owner

Hello again poa00, thank you for opening this issue! 💜

I wish this was a bug I could fix for you, but I don't think there is much I can do. I touched on this in my comment in your previous issue.

Basically, if the website decides to respond with the same exact last page no matter how high the start value is, then that's what will continue to be appended. Incrementing is a different beast than following a next link because there is no concept of there being a "last page" unless you reach the maximum possible integer (or decide to stop scrolling).

It is possible for me to try and make Infy "smart" and compare the previous page with the next page, and if they match up exactly, make it stop appending. However, that would be totally unacceptable to many users because it wouldn't allow them to use Infy to scrape a site or to continue incrementing in a situation where there may be duplicate error pages returned (think of consecutive missing IDs that generate the same exact Error 404 page).

I suppose I could make it an option to have it behave that way, but there is really no room left in the UI. It's also such a niche use-case. I'll notate this and keep it in mind in the future, but I'm really trying to limit the number of settings I add to Infy as it has grown quite large. (I also currently have my hands full trying to update everything to Manifest V3 this year, unfortunately!)

Sorry, I know this isn't what you were hoping to hear, but I hope this helps explain things. ☹️

@poa00
Copy link
Author

poa00 commented Jan 26, 2024

Hey no worries. I appreciate your responsiveness, and the extension is awesome as-is so a minor hiccup like this is not an issue at all. As a workaround I can just increase the number of pixels from the bottom of the page that triggers the subsequent page to be appended, and print when I reach last page.

Thinking about your response (the part about your UI not having space): This is just a thought, but you could potentially add a small input box as part of the overlay where a user could enter the total number of pages, after which Infy can stop appending.

I imagine it wouldn't even have to be something that needs to be saved for later use. Moreover, I bet most users would prefer having to enter two digits on a particular page every time they visit that page, as opposed to the alternative of scrolling in search of the last page of the article/thread to copy/save the article from beginning to its proper end. When it comes to coding, I am definitely a beginner, so I have no idea how much work would be involved in implementing something like this. I just figured that if there's a chance adding this functionality would be feasible, it would be worth mentioning this as a way to avoid further crowding your UI.

Again, a happy camper here who is very much enjoying the perks of this extension, so however you decide to proceed, I'm definitely not complaining.

@sixcious sixcious changed the title Append Mode using regex and increments to a base continues adding the same pages even after reaching the last page of an article / thread Add an option to detect the last page and then stop appending Feb 10, 2024
@sixcious sixcious changed the title Add an option to detect the last page and then stop appending Add an option to detect the last page and then stop appending (e.g. duplicate pages) Feb 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants