#1
|
|||
|
|||
4chan HTML update (patch included)
4chan has recently been updated with a new internal layout for the HTML. Threads have been moved from /res to /thread and now have a slug at the end describing the thread. This broke the URL detection in the plugin, as well as the thread number detection. Images have had /src removed from their image path.
Strip off .txt extension, apply to JDownloader project via Team -> Apply patch ... (or whatever your localised equivalent is) URLs to test against: **External links are only visible to Support Staff****External links are only visible to Support Staff** **External links are only visible to Support Staff****External links are only visible to Support Staff** **External links are only visible to Support Staff****External links are only visible to Support Staff** **External links are only visible to Support Staff****External links are only visible to Support Staff** **External links are only visible to Support Staff****External links are only visible to Support Staff** **External links are only visible to Support Staff****External links are only visible to Support Staff** **External links are only visible to Support Staff****External links are only visible to Support Staff** **External links are only visible to Support Staff****External links are only visible to Support Staff** **External links are only visible to Support Staff****External links are only visible to Support Staff** **External links are only visible to Support Staff****External links are only visible to Support Staff** **External links are only visible to Support Staff****External links are only visible to Support Staff** The part caught in the first if block would appear to grab all the threads on a page, but it doesn't look like it works at the moment, and I'm not sure if it worked before the change since I've never tried it. It shouldn't be too much trouble to fix at a less ungodly hour, so if that feature is needed again, let me know and I'll see if I can make it work. |
#2
|
||||
|
||||
Please wait for developer's reply. I linked this thread with one ticket that we have.
Ticket:
__________________
» Setup JD2 / Instalador de JD2 «
Spoiler:
Installer for Windows XP/Vista/Seven/Eight || JD2 x86 - x64 (Beta) || Installer for Mac || JD2 (Beta) || Installers for Linux || JD2 (Beta) x86 || <---> || JD2 (Beta) x64 || How to Create a Log -» Click Here «- ¿Cómo crear un registro? -» Click Aquí «- Support Chat / Chat de Soporte -» Click Here / Click Aquí «- |
#3
|
||||
|
||||
Fixed, thx for the patch!
--- [Please read]=>How/when do I get updates? Read it carefully BEFORE complaining that something would still be not working! --- [Bitte lesen]=>Wie/wann bekomme ich Updates? Bitte vollständig lesen bevor ihr euch beschwert, dass etwas immernoch nicht funktionieren würde! GreeZ pspzockerscene
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
#4
|
|||
|
|||
Doesn't seem to have done the trick. It's missing images with long names, these have <a title="..." href="...">. Patch in the works ...
Code:
br.getRegex("(?i)File: <a( title=\".*\\.(gif|jpg|png|webm)\")? href=\"(//" + IMAGERDOMAINS + "/[0-9a-z]{1,4}/(src/)?\\d+\\.(gif|jpg|png|webm))\"") Right, got it. Instead of grabbing onto the file link, this patch grabs onto the thumbnail, and accounts for "spoiler images" on boards that support them. I think by removing the "old" check for images I've fixed something I ran into a while ago: where someone pasted in the literal URL of a 4chan image, the board turned it into a link, which the plugin picked up on - images[].length not being zero, it would then miss out on the images posted in that thread. Finally, I've corrected the board name length in the plugin definition from {1,3} to {1,4}, since a length of 3 excluded amongst other things the rather handy /test/ board that becomes public when moot makes changes to the HTML. Last edited by mwl; 22.04.2014 at 22:36. |
#5
|
||||
|
||||
I improved it, please check that out first.
GreeZ psp
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
#6
|
|||
|
|||
Looks good. You'll still need to change the {1,3} to {1,4}, and you'll need to remove this:
Code:
br.getRegex("(?i)(https?://[\\w\\.]*?" + IMAGERDOMAINS + "/[0-9a-z]{1,4}/(src/)?\\d+\\.(gif|jpg|png|webm))").getColumn(0) Last edited by mwl; 24.04.2014 at 22:34. |
#7
|
||||
|
||||
I changed the regex though your patch file somehow doesn't work.
Please post the full plain code. GreeZ psp
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
#8
|
|||
|
|||
Changes on lines 32 and 59.
|
#9
|
|||
|
|||
This is still broken. Threads with image URLs linked in the text are still grabbing those instead of the images posted to the thread.
Fails on this post (very NSFW): **External links are only visible to Support Staff****External links are only visible to Support Staff** Instead of grabbing the thread images, the plugin grabs these two URLs which it should not be grabbing, and nothing else. Fails also here (again, very NSFW): **External links are only visible to Support Staff****External links are only visible to Support Staff** Grabs the URL in the post but no images from the thread. Last edited by mwl; 31.05.2014 at 06:31. |
#10
|
||||
|
||||
Simply post your fix here and I'll apply and committ it
GreeZ psp
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
#11
|
|||
|
|||
This is also in the file I attached about two posts up.
|
#12
|
||||
|
||||
Line is missing.
2 nearly identical regexes are used twice in this decrypter. GreeZ psp
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
#13
|
|||
|
|||
Around line 59 in the version I have in my IDE.
This: Code:
String[] images = br.getRegex("(?i)(https?://[\\w\\.]*?" + IMAGERDOMAINS + "/[0-9a-z]{1,4}/(src/)?\\d+\\.(gif|jpg|png|webm))").getColumn(0); if (images == null || images.length == 0) images = br.getRegex("(?i)File: <a (title=\"[^<>\"/]+\" )?href=\"(//" + IMAGERDOMAINS + "/[0-9a-z]{1,4}/(src/)?\\d+\\.(gif|jpg|png|webm))\"").getColumn(1); Code:
String[] images = br.getRegex("(?i)File: <a (title=\"[^<>\"/]+\" )?href=\"(//" + IMAGERDOMAINS + "/[0-9a-z]{1,4}/(src/)?\\d+\\.(gif|jpg|png|webm))\"").getColumn(1); |
#14
|
||||
|
||||
Done.
--- [Please read]=>How/when do I get updates? Read it carefully BEFORE complaining that something would still be not working! --- [Bitte lesen]=>Wie/wann bekomme ich Updates? Bitte vollständig lesen bevor ihr euch beschwert, dass etwas immernoch nicht funktionieren würde! GreeZ pspzockerscene
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
Thread Tools | |
Display Modes | |
|
|