hdwallpapers

Discussions and Tech Support related to the iMacros Firefox Add-on, including the built-in Javascript scripting interface for playing .js files.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

hdwallpapers

by skylinetturbo on Tue May 09, 2017 9:06 am

Got help from a decent human being....
Last edited by skylinetturbo on Tue May 16, 2017 2:26 pm, edited 1 time in total.
skylinetturbo
 
Posts: 14
Joined: Mon May 06, 2013 7:31 pm

Re: hdwallpapers

by chivracq on Tue May 09, 2017 3:41 pm

skylinetturbo wrote:I just need help fixing this. Someone else wrote the original code for me. I DON'T UNDERSTAND HOW TO DO THIS!!! I never will.. It's just not something that my brain can figure out... I made a similar post 2 years ago and 2 years before that, so I'm back again with my bi-yearly post... It can't possibly be that difficult or time consuming or that straining on someones life to just write the fix for this.... All I want is to be able to download all of the wallpapers from hdwallpapers.in in each category (I don't mind manually switching categories) moving from picture to picture and page to page, with the 1920x1080 dimension then stop it. I've seen so many complicated scripts written on here and the one that was written for me was just what, 10 to 12 lines of very simple code, I just DO NOT understand how this stuff works.... So I'm asking for a final plea for help... I posted all the information under the forum rules that I can find. Sorry to sound like I'm bitching, which I kind of am, but I'm so frustrated with this and I just want some help... it's been 4 years of trying to get this done, and it can't possibly be that hard for someone to step in and help me...

1. iMacros version -
Code: Select all
VERSION BUILD=7500718 Firefox & VERSION BUILD=5301016 for Chrome
(I'll get to that below)

2. What operating system are you using? (please also specify language)
Code: Select all
MacOS Sierra Version: 10.12.4 (16E195)


3. Which browser(s) are you using? (include version numbers)
Code: Select all
Firefox 53.0.2 (64-bit) and Chrome Version 57.0.2987.133 (64-bit)


4. Do the included demo macros work ok?
No. When I go to play them, they do what they're supposed to when they start up, but they won't finish the process.

5. If reporting a problem with the Scripting Interface, please also test if the included VBS sample scripts run ok.
Don't know the answer to this..

6. If recording or replay fails on a specific website: Can you please post the URL of the web page and/or the imacro that creates the problem?
Code: Select all
hdwallpapers.in
here are two versions of the macro that I've tried, they seem to work fine, but when the file tells the script to (sorry don't know anything about coding at all) go back to the previous page, it won't... See below

7. Do you encounter the same problem with the iMacros Browser, iMacros for Internet Explorer and iMacros for Firefox? Note: If your question is specifically about iMacros for Yes, I do encounter the same problem when trying the same scripts on Chrome and Firefox...

here is what I've tried...

script01.iim
Code: Select all
TAB T=1
SET !REPLAYSPEED MEDIUM
TAG POS={{!LOOP}} TYPE=IMG ATTR=SRC:http://www.hdwallpapers.in/thumbs/**.jpg
TAG POS=1 TYPE=A ATTR=TXT:1920<SP>x<SP>1080
TAB T=2
TAB T=2
FRAME F=0
FRAME F=0
ONDOWNLOAD FOLDER=* FILE=+_{{!NOW:yyyymmdd_hhnnss}} WAIT=YES
TAG POS=1 TYPE=A ATTR=TXT:Download
TAG POS=1 TYPE=A ATTR=TXT:Close<SP>window
TAB T=1
TAB T=1
BACK


script02.iim
Code: Select all
TAB T=1
SET !REPLAYSPEED MEDIUM
TAG POS={{!LOOP}} TYPE=IMG ATTR=SRC:http://www.hdwallpapers.in/thumbs/**.jpg
TAG POS=1 TYPE=A ATTR=TXT:1920<SP>x<SP>1080
ONDOWNLOAD FOLDER=* FILE=+_{{!NOW:yyyymmdd_hhnnss}} WAIT=YES
TAG POS=1 TYPE=A ATTR=TXT:Download
TAG POS=1 TYPE=A ATTR=TXT:Close<SP>window
BACK

Oh-yeah, Oh-yeah...!, yep I remember you, ah-ah...!, I already tried to help you in your 2 previous Threads from 2 and 4 years ago but you never tried anything by yourself and never followed any of my Suggestions/Directions, you keep posting the Script that sbd wrote for you from your 1st Thread...
I honestly already gave you all Instructions in your 2 previous Threads (I read them all 3 completely again...), with one mini-Mistake I notice now, 'ONDOWNLOAD' is able to create Folders even if they don't exist yet thanks to the 'FOLDER' Parameter, according to the Wiki, I said the contrary in one of your 2 previous Threads (but gave you a Workaround, which is not needed then...)...

Like I said earlier, 2 or 4 years ago, I won't be writing your Script, there is absolutely nothing difficult in your Scenario, it's a typical-typical Use of iMacros, anybody discovering iMacros for your Purpose can get your Script to work within 1 hour...

Read again with complete Attention your 2 previous Threads and follow my Instructions and you should get your Script to work in less than 1h, ah-ah...! But you're welcome again of course if you really get stuck somewhere...
About 1 hour of "Effort" trying your best 4 years ago and you would already have had your Script working nicely from 4 years ago already... :idea:

iMacros is the easiest Language you can wish, you just need to click on some 'Record' Button, check what gets recorded, and maybe need to make some slight "Adjustments", not even needed in your Case I would think, usually only needed for Extractions, but you don't do any Extraction..., the Download Process is already completely automated...

GOOD LUCK...! :wink:

>>>

Oh, sorry, and I forgot, but your FCI(s) is/are a bit "wrong":
1. iMacros version -
Code: Select all
VERSION BUILD=7500718 Firefox & VERSION BUILD=5301016 for Chrome
(I'll get to that below)

2. What operating system are you using? (please also specify language)
Code: Select all
MacOS Sierra Version: 10.12.4 (16E195)


3. Which browser(s) are you using? (include version numbers)
Code: Select all
Firefox 53.0.2 (64-bit) and Chrome Version 57.0.2987.133 (64-bit)

OK, OS is OK: MacOS Sierra Version: 10.12.4 (16E195)

But v7.50 for FF is a very old Version from about 5 or 6 years ago that doesn't work on FF53, your probable Version is v9.0.3 or v8.9.7.
You were already using v8.9.2 for FF 2 years ago, no idea where you got this v7.50 Version from... :?

Same thing for CR, v5.30 is as well about 4 years old and doesn't work on CR57 or any CR Version after CR35 I think, current iMacros for CR Version would be v8.4.4.

=> If you could check those 2 Versions...!?
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6282
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: hdwallpapers

by skylinetturbo on Tue May 16, 2017 1:41 pm

Thanks...
skylinetturbo
 
Posts: 14
Joined: Mon May 06, 2013 7:31 pm

Re: hdwallpapers

by chivracq on Wed May 17, 2017 1:41 pm

skylinetturbo wrote:Thanks...

Well, I guess I was bit "bored" a few days ago, oops...! :oops: , I've actually started writing a Script for your Site, as your Case is actually a typically perfect Usecase for iMacros, like I had already mentioned in one of your previous Threads...

I think the Script is not finished, I had noticed some Glitches when running it on different Categories and with "Download Speed", you need to start it manually from some Category, but you can already try it and already have a look, I'll need to dig into it again, always depends on how busy the Forum is, and I have a personal Life as well, ah-ah...! :wink:

Code: Select all
VERSION BUILD=8820413 RECORDER=FX
'SET !ERRORIGNORE YES
SET !TIMEOUT_STEP 0
SET !EXTRACT_TEST_POPUP NO
TAB T=1

'URL GOTO=http://www.hdwallpapers.in/animals__birds-desktop-wallpapers.html
SET !LOOP 1

'Easy Access Vars:
'******************
SET AutoDetect_Pix_per_Page YES
SET AutoDetect_on "href"
'Default Nb of Pix per Page if 'AutoDetect' is set to "NO" or if 'AutoDetect' encounters a Pb:
SET Pix_per_Page_Default 14

'Extract and reconstruct URL and Page from Current_URL:
SET URL_Main EVAL("var u='{{!URLCURRENT}}'; var z; z=u.split('/'); z[2];")
SET URL_Category EVAL("var u='{{!URLCURRENT}}'; var x,y,z; x=u.split('/'); z=x[3].replace('.html',''); z;")
SET URL_Page EVAL("var u='{{!URLCURRENT}}'; var x,y,z; x=u.split('/page/'); y=x.length; if(y==2){z=x[1];} else{z=1;}; z;")
SET URL_up_to_Page_Nb http://{{URL_Main}}/{{URL_Category}}/page/
SET URL_Current {{URL_up_to_Page_Nb}}{{URL_Page}}
'>
'Debug:
SET URL_Debug URLCURRENT:<BR>_{{!URLCURRENT}}_<BR><BR>
ADD URL_Debug URL_Current:<BR>_{{URL_Current}}_<BR><BR>
ADD URL_Debug URL_Main:<SP>_{{URL_Main}}_<BR>URL_Category:<SP>_{{URL_Category}}_<BR>URL_Page:<SP>_{{URL_Page}}_
SET Debug {{URL_Debug}}
'PROMPT {{Debug}}
'PAUSE

'Extract 'Category': (Will be used for saving Images in Sub-Folders.)
'********************
'=> 2 kinds of Titles:
'TAG POS=1 TYPE=H1 ATTR=TXT:Category<SP>Animals<SP>&<SP>Birds<SP>-<SP>page<SP>1    // ("Category " + ...)
'TAG POS=1 TYPE=H1 ATTR=TXT:Wallpapers<SP>Of<SP>Military<SP>-<SP>Page<SP>1        // ("Wallpapers Of " + ...)
SET !EXTRACT NULL
TAG POS=1 TYPE=H1 ATTR=TXT:*<SP>-<SP>page<SP>* EXTRACT=TXT
SET Category EVAL("var s='{{!EXTRACT}}'; var x,y,z; x=s.replace('Category ',''); y=x.replace('Wallpapers Of ',''); z=y.split(' - '); z[0];")
'>
'Debug:
ADD Debug <BR><BR>Category_EXTRACT:<SP>_{{!EXTRACT}}_<BR>Category:<SP>_{{Category}}_
'PROMPT {{Debug}}
'PAUSE

'AutoDetect Nb of Pix per Page:
'*******************************
'SET Pix_per_Page_Default 14   // (Defined in 'Easy Access' Section.)
SET !EXTRACT NULL
TAG POS=1 TYPE=UL ATTR=CLASS:"wallpapers" EXTRACT=HTM
SET Pix_per_Page EVAL("var s='{{!EXTRACT}}', ado='{{AutoDetect_on}}'; var x,y,z; x=s.split(ado); y=x.length; z=y-1; z;")
SET Modulo {{Pix_per_Page}}
'>
'Debug:
SET Modulo_Debug AutoDetect_Pix_per_Page:<SP>_{{AutoDetect_Pix_per_Page}}_<BR>AutoDetect_on:<SP>_"{{AutoDetect_on}}"_<BR>
ADD Modulo_Debug Pix_per_Page_Default:<SP>_{{Pix_per_Page_Default}}_<BR>Pix_per_Page:<SP>_{{Pix_per_Page}}_
ADD Debug <BR><BR>{{Modulo_Debug}}<BR><BR>
'PROMPT {{Debug}}
'PAUSE


'Download Wallpapers:
'*********************
'Recorded:
'TAG POS=1 TYPE=IMG ATTR=SRC:http://www.hdwallpapers.in/thumbs/2017/porsche_design_dark_abstract-t1.jpg
'TAG POS=1 TYPE=SPAN ATTR=TXT:Download<SP>resolutions:
'TAG POS=1 TYPE=B ATTR=TXT:Original

'Compute Pix_Position on Page:
SET Pix_POS EVAL("var l='{{!LOOP}}', m='{{Modulo}}'; var z; z=l%m; z;")
SET !EXTRACT NULL
TAG POS={{Pix_POS}} TYPE=IMG ATTR=SRC:http://{{URL_Main}}/thumbs/*.* EXTRACT=HREF
SET Pix_HREF {{!EXTRACT}}<SP>
TAG POS={{Pix_POS}} TYPE=IMG ATTR=SRC:http://{{URL_Main}}/thumbs/*.*
'>
SET !EXTRACT NULL
'TAG POS=1 TYPE=B ATTR=TXT:Original EXTRACT=HTM
TAG POS=1 TYPE=A ATTR=TXT:Original EXTRACT=HREF
SET Pix_Orig_HREF {{!EXTRACT}}
'>
'Real Download:
ONDOWNLOAD FOLDER=D:\TEMP\iMacros\Downloads\Wallpapers\{{URL_Main}}\{{Category}} FILE=* WAIT=YES
'ONDOWNLOAD FOLDER=D:\TEMP\iMacros\Downloads\{{Category}} FILE=* WAIT=YES
TAG POS=1 TYPE=A ATTR=TXT:Original CONTENT=EVENT:SAVETARGETAS
'>
'Debug:
SET Pix_Debug Modulo:<SP>_{{Modulo}}_<BR>LOOP:<SP>_{{!LOOP}}_<SP>/<SP>Pix_POS:<SP>_{{Pix_POS}}_<BR>
ADD Pix_Debug Pix_HREF:<BR>{{Pix_HREF}}<BR><BR>Pix_Orig_HREF:<BR>{{Pix_Orig_HREF}}
ADD Debug {{Pix_Debug}}
'PROMPT {{Debug}}
'PAUSE
BACK

'Reload URL to go to next Page...?:
'SET URL_Next_Page EVAL("var u='{{URL_up_to_Page_Nb}}', p='{{URL_Page}}' <...> To be continued...!
(Written and tested on iMacros for FF v8.8.2, Pale Moon v26.3.3 (=FF47), Win10-x64.)
=> Still a bit buggy I think, not finished...

Would be nice if you already had a look, and tried to understand a bit how it "works"..., I deliberately used a few "Advanced" Techniques that I have never "published" before, maybe only more or less vaguely mentioned, like the 'AutoDetect' Feature for example, and how I debug my Scripts..., to provide some Example(s) for the Forum Community...
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6282
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)


Return to iMacros for Firefox

Who is online

Users browsing this forum: No registered users and 9 guests

-->