Author Topic: Thread Sucker  (Read 1236 times)

Firewaran

  • Full Member
  • ***
  • Joined: Dec 2010
  • Posts: 218
Thread Sucker
« on: April 10, 2016, 05:53 am »
Hi guys,

i have made a universal thread sucker entry that can replace a few entries in forum_styles.xml

Here is the code:
Code: [Select]
<forum id="universal with page">
<urlpattern>^https?:\/\/.+page[=|\/]?\d+(.+)?</urlpattern>
<searchpattern><![CDATA[function(threadURL) {
    var Strings = {};
    Strings.orEmpty = function( entity ) {
        return entity || "";
    };

    var sParts = threadURL.match(/(^https?:\/\/.+page[=|\/]?)(\d+)(.+)?/);
    var sNextPage = sParts[1] + (threadsucker_Globals.linkIndex) + Strings.orEmpty(sParts[3]);

    return sNextPage;   
}]]></searchpattern>
</forum>

It will enable on all forums that have Page=#, Page# or Page\# as paging indication.
Then thread sucker will normally enable on pages greater 1, this is because page 1 is normally not with page-indication.

I tested the solution on:
The list is not complete. Maybe you want to help clean up the forum_styles.xml?

Hope you enjoy this.
« Last Edit: April 20, 2016, 02:50 pm by Firewaran »

Greg

  • Manager
  • *****
  • Joined: Jan 2013
  • Location: On the Ethernet
  • Posts: 1305
Re: Thread Sucker
« Reply #1 on: April 10, 2016, 12:03 pm »
Good work! I didn't know that could be done!

SenileDog

  • Full Member
  • ***
  • Joined: Jun 2015
  • Posts: 130
Re: Thread Sucker
« Reply #2 on: April 11, 2016, 12:02 am »
Terrific, Firewaran!  :thumbsup:

It is even working with one I am fiddling with, not published yet.
What other proof do you need.

Firewaran

  • Full Member
  • ***
  • Joined: Dec 2010
  • Posts: 218
Re: Thread Sucker
« Reply #3 on: April 11, 2016, 04:16 pm »
That is the best proof when it works on new forums :D

Maybe it take another look on the other solutions if they some how similar and try another universal one.
If you already have a suggestion, i have an open ear for it ;)

Greg

  • Manager
  • *****
  • Joined: Jan 2013
  • Location: On the Ethernet
  • Posts: 1305
Re: Thread Sucker
« Reply #4 on: April 11, 2016, 05:03 pm »
Does it work on http://vipergirls.to ?

I've never used the feature.

SenileDog

  • Full Member
  • ***
  • Joined: Jun 2015
  • Posts: 130
Re: Thread Sucker
« Reply #5 on: April 11, 2016, 05:29 pm »

SenileDog

  • Full Member
  • ***
  • Joined: Jun 2015
  • Posts: 130
Re: Thread Sucker
« Reply #6 on: April 11, 2016, 10:03 pm »
@Firewaran

I tried this: ^https?:\/\/.+[page|p][=|\/]?\d+(.+)? was not happy,

then this: ^https?:\/\/.+[page|p](?:[=|\/])??\d+(.+)? trying to capture this pattern http://whatever.com/picture/p30, no joy either,

so, back to square one, for now.
« Last Edit: April 12, 2016, 01:33 pm by SenileDog »

Firewaran

  • Full Member
  • ***
  • Joined: Dec 2010
  • Posts: 218
Re: Thread Sucker
« Reply #7 on: April 12, 2016, 11:51 am »
You were not far away, try (?:page|p) instead of [page|p] in urlpattern and searchpattern.

I saw some solutions on that in the file, but i didn't want to do it this way because you could get a lot of false positives.
The keyword page is pretty unique but for example "model-p392-nice-sets" would not be a page-indication.

I fear that my universal solution would get more greedy with this change and it is already greedy enough to not allow other solutions.
Not sure how IHG is prioritizing the current entries.

SenileDog

  • Full Member
  • ***
  • Joined: Jun 2015
  • Posts: 130
Re: Thread Sucker
« Reply #8 on: April 12, 2016, 01:31 pm »
Ok, will check  (?:page|p)

I agree with you, it is greedy enough.

The one I was fiddling with is hentai-foundry

like from http://www.hentai-foundry.com/pictures/user/Oni/page/12

update this in your hostf.xml

<host id="hentai-foundry">
<urlpattern>^http:\/\/www\.hentai-foundry\.com\/(pic-.+|pictures\/user\/.+\/\d+\/.+)</urlpattern>
<searchpattern>"(.(?!http)).+?\/\/pictures\.hentai(.+?)"</searchpattern>
</host>

click on a pic, to activate the adult content +18.

And you should be able to TS with your universal pattern.

Firewaran

  • Full Member
  • ***
  • Joined: Dec 2010
  • Posts: 218
Re: Thread Sucker
« Reply #9 on: April 12, 2016, 02:38 pm »
Please post your solution on hentai-foundry in the corresponding thread so it gets into the regular update.
It works great.

Great i could save you a bit of work for that :D - shame on me that i didn't do it earlier.

SenileDog

  • Full Member
  • ***
  • Joined: Jun 2015
  • Posts: 130
Re: Thread Sucker
« Reply #10 on: April 13, 2016, 09:35 pm »
Removed from forum_styles.xml not needed after universal with page.

tested so far:

bcfakes
danbooru.donmai (had to rewrite it in hostf to make it work, will post update if I do not forget)done
eroticity
hentai-foundry
konachan.com

Firewaran, if you have a forum_styles with less hosts, can you attach it.

Hosts on mine are just commented out with <!-- --> for now.

will attach a new version when more progress.
« Last Edit: April 14, 2016, 07:18 pm by SenileDog »

SenileDog

  • Full Member
  • ***
  • Joined: Jun 2015
  • Posts: 130
Re: Thread Sucker
« Reply #11 on: April 13, 2016, 09:59 pm »
Firewaran, do you get pics from http://www.gettyimages.de/EditorialImages/Sport?page=2, I don't.
« Last Edit: April 14, 2016, 07:19 pm by SenileDog »

Firewaran

  • Full Member
  • ***
  • Joined: Dec 2010
  • Posts: 218
Re: Thread Sucker
« Reply #12 on: April 14, 2016, 03:17 pm »
No i don't - at first.

But it may be because if you click on a picture you get to the gallery of pictures and not just one.
The thread sucker would be active because it is greedy :D

If you have open a gallery you can download that pictures but not with the sucker.

I don't know how IHG could handle this kind of "gallery of gallery" style to allow to suck the "pages" and the "sub-pages".

Firewaran

  • Full Member
  • ***
  • Joined: Dec 2010
  • Posts: 218
Re: Thread Sucker
« Reply #13 on: April 15, 2016, 10:42 am »
Thank you, added the forum to the tested list.

Is this a general request to do a solution for that forum  :huh:
I guess it would be no general one, cause /#/ is not really to be seen as page indication.

SenileDog

  • Full Member
  • ***
  • Joined: Jun 2015
  • Posts: 130
Re: Thread Sucker
« Reply #14 on: April 19, 2016, 09:13 pm »
Two other one bite the dust, thanks to "universal with page"

theplace2.ru - no update needed

twitpic.com - had to fix it first