Post Reply 
Automatically zooming in DeviantArt images
Oct. 13, 2006, 03:16 PM
Post: #1
Automatically zooming in DeviantArt images
Hi,
I've been a happy Proxomitron user since 1999 and have never had problems with writing simple filter rules, but this one has me stumped. DeviantArt uses JavaScript to switch the "Zoomed out" image to the higher resolution "Zoomed in" image. The location of the higher resolution image is the "Head" of the HTML page.
Is it possible to take the location and use it instead of the lower res image? I wish to browse DA without JavaScript.
Also, a previous post ("A little help with deviantart") mentioned removing the "Click here to continue" pages, but I could not get it to work, nor could I copy the filter and "Import filters from clipboard". Proxomitron gave me a "No filters found" error, even though I checked the code in Notepad.
Would someone be so kind and write the filter to automatically "Zoom in" the images and skip the "Click here to continue" pages without enabling JavaScript in the browser? It would really make my day.
Add Thank You Quote this message in a reply
Oct. 14, 2006, 03:03 AM
Post: #2
RE: Automatically zooming in DeviantArt images
SimplerHTML;
Quote:Hi,
DeviantArt uses JavaScript to switch the "Zoomed out" image to the higher resolution "Zoomed in" image. The location of the higher resolution image is the "Head" of the HTML page. Is it possible to take the location and use it instead of the lower res image?

Welcome to the forums!

My gut reaction is to say "sure, Proxo can do that". But before I get hung out on a limb somewhere, we'll need to see an exact URL for a page that represents what you want, if you'd be so kind. Smile!


Oddysey

I'm no longer in the rat race - the rats won't have me!
Add Thank You Quote this message in a reply
Oct. 14, 2006, 04:35 AM
Post: #3
RE: Automatically zooming in DeviantArt images
Thank you for the nice welcome! And yes, I'd better show some examples:

http://www.deviantart.com/deviation/3949...n%3Ascraps
is the link from the artist's gallery, although http://www.deviantart.com/deviation/39498364/ also works.

http://tn3-1.deviantart.com/fs11/300W/i/...cLight.jpg is the URL of the "zoomed out" image that shows up when you visit the above page. The URL of the higher res image that I actually want to see is
http://ic1.deviantart.com/fs11/i/2006/25...cLight.jpg
The URL to this image can be found in the "head" but it appears as this
http:\/\/ic1.deviantart.com\/fs11\/i\/2006\/251\/b\/e\/Engulf_the_Trees_by_TheDynamicLight.jpg

As for the "Click here to continue" pages, they pop up at random and probably the only thing Proxomitron can do is automatically follow the link or refresh the page (?) which, if I remember correctly, would have the same effect since the URL of the page and the "Click here to continue" link is the same (I think).
Add Thank You Quote this message in a reply
Oct. 14, 2006, 01:50 PM
Post: #4
RE: Automatically zooming in DeviantArt images
Try:
Code:
[Patterns]
Name = "deviantart.com"
Active = TRUE
URL = "$TYPE(htm)[^/]++.deviantart.com/"
Limit = 512
Match = "(fullview":{"width":$AV(\\1),"height":$AV(\\2),"src":$AV((\#\\\)+\#)})\\0"
        "$SET(pic=\@)$SET(W=\\1)$SET(H=\\2)"
        "|"
        "<img id="zoomed-out-image" src=$AV(*)*/>"
        "$SET(\\0=<img id="zoomed-out-image" src="$GET(pic)" width="$GET(W)" height="$GET(H)" />)"
        "|"
        "<a href=$AV(*) class="continue">Click here to continue to deviantART[/url]"
        "$SET(\\0=<meta http-equiv="refresh" content="0;url=\u">)"
        "|"
        "(<div class="stream-ads">)\\0"
Replace = "\\0"

HTH
Add Thank You Quote this message in a reply
Oct. 14, 2006, 02:56 PM
Post: #5
RE: Automatically zooming in DeviantArt images
Thank you! It works just great. The filter looks pretty complicated, you just inspired me to figure out just HOW you did it. The filters I created in the past pretty much only removed things. Thanks again.
Add Thank You Quote this message in a reply
Oct. 15, 2006, 01:45 AM
Post: #6
RE: Automatically zooming in DeviantArt images
SimplerHTML Wrote:The filter looks pretty complicated,
It could be 4 separate filters and some of it is more complicated than necessary.Wink
Code:
"(fullview":{"width":$AV(\\1),"height":$AV(\\2),"src":$AV((\#\\\)+\#)})\\0"
"$SET(pic=\\@)$SET(W=\\1)$SET(H=\\2)"
This part captures the dimensions and the URL. The "\"s are removed from the URL by using the stack, "(\#\\)+\#)". The values are written to 'pre-request' variables so they can be used when the filter matches later:
Code:
"<img id="zoomed-out-image" src=$AV(*)*/>"
"$SET(\\0=<img id="zoomed-out-image" src="$GET(pic)" width="$GET(W)" height="$GET(H)" />)"
(In code above and below, the $AV(*) isn't necessary. It's a habit of mine. In both cases, * would work. If the code below wasn't an immediate refresh, * might allow the filter to match too much, however.)
Code:
"<a href=$AV(*) class="continue">Click here to continue to deviantART[/url]"
"$SET(\\0=<meta http-equiv="refresh" content="0;url=\u">)"
Match the 'continue' code and replace it with an immediate refresh.

Code:
"(<div class="stream-ads">)\\0"
Because http://www.castlecops.com/t169193-FYI_deviantart.html

Code:
Replace = "\\0"
One filter looks nice. So each part will write its contribution to the 'positional' variable \0 and may need to use $SET(\0=stuff in here) to do it.

HTH
Add Thank You Quote this message in a reply
Post Reply 


Forum Jump: