[HELP] Problem when download image

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.

[HELP] Problem when download image

by krkannan94 on Wed May 31, 2017 3:18 am

hi bros, first of all English isn’t my first language, so please excuse any mistakes :D

I'm using iMacros v9.0.3 on Firefox 53.0.3 (64 bit) in Windows 8 x64
I'm trying to download all of my followers profile picture, the code is just working fine until its reach the POS=30 after that an error occurred & it says
    " RuntimeError: element IMG specified by SRC:https://pbs.twimg.com/profile_images/*.jpg was not found, line 6 (Error code: -921 "

https://mobile.twitter.com/iMacros/followers
Image

Here is an iim example code :
Code: Select all
VERSION BUILD=8970419 RECORDER=FX
TAB T=1
WAIT SECONDS=1
SET !VAR1 1
ADD !VAR1 {{!LOOP}}
TAG POS={{!VAR1}} TYPE=IMG ATTR=SRC:https://pbs.twimg.com/profile_images/*.jpg
WAIT SECONDS=1
TAG POS=1 TYPE=IMG ATTR=SRC:https://pbs.twimg.com/profile_images/*.jpg
ONDOWNLOAD FOLDER=* FILE=*
TAG POS=1 TYPE=IMG ATTR=SRC:https://pbs.twimg.com/profile_images/*.jpg CONTENT=EVENT:SAVEITEM
WAIT SECONDS=1
BACK
BACK


Any ideas to download all the profile pictures or any other ways to download ?? :) and thx in advance to all my brothers :D :D
krkannan94
 
Posts: 19
Joined: Wed May 24, 2017 10:04 pm

Re: [HELP] Problem when download image

by chivracq on Wed May 31, 2017 9:42 am

krkannan94 wrote:hi bros, first of all English isn’t my first language, so please excuse any mistakes :D

I'm using
Code: Select all
iMacros v9.0.3 on Firefox 53.0.3 (64 bit) in Windows 8 x64

I'm trying to download all of my followers profile picture, the code is just working fine until its reach the POS=30 after that an error occurred & it says
    " RuntimeError: element IMG specified by SRC:https://pbs.twimg.com/profile_images/*.jpg was not found, line 6 (Error code: -921 "

https://mobile.twitter.com/iMacros/followers
Image

Here is an iim example code :
Code: Select all
VERSION BUILD=8970419 RECORDER=FX
TAB T=1
WAIT SECONDS=1
SET !VAR1 1
ADD !VAR1 {{!LOOP}}
TAG POS={{!VAR1}} TYPE=IMG ATTR=SRC:https://pbs.twimg.com/profile_images/*.jpg
WAIT SECONDS=1
TAG POS=1 TYPE=IMG ATTR=SRC:https://pbs.twimg.com/profile_images/*.jpg
ONDOWNLOAD FOLDER=* FILE=*
TAG POS=1 TYPE=IMG ATTR=SRC:https://pbs.twimg.com/profile_images/*.jpg CONTENT=EVENT:SAVEITEM
WAIT SECONDS=1
BACK
BACK


Any ideas to download all the profile pictures :) and thx in advance to all my brothers :D :D

Well, I guess the Images/Profiles after the first 30 ones get "dynamically" loaded only after you start scrolling down the Page but your 'BACK+BACK' is similar to loading the Start Page from scratch.
=> You might rather want to load and download all specific Images in a 2nd Tab and keep the "main" Page in TAB_1 and you can include some mini-Scroll Statement to your Loop Script on TAB_1. This Approach will be quicker as well than yours as it avoids the 2 'BACK' and Reload the previous Page...
Your FCI mentions that you are using v9.0.3 for FF (while your Script mentions v8.9.7), but the Syntax/Statement to scroll down a Page using 'URL GOTO=javascript:' is not supported in v9.0.3 anymore, you will need to revert to v8.9.7 (which is the stable Version on FF anyway).
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 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: 5730
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: [HELP] Problem when download image

by krkannan94 on Thu Jun 01, 2017 12:08 am

Your FCI mentions that you are using v9.0.3 for FF (while your Script mentions v8.9.7), but the Syntax/Statement to scroll down a Page using 'URL GOTO=javascript:' is not supported in v9.0.3 anymore, you will need to revert to v8.9.7 (which is the stable Version on FF anyway).


Sorry, i am unknowingly mentioned that imacros version as v9.0.3 :( actually i'm using imacros v8.9.7


You might rather want to load and download all specific Images in a 2nd Tab and keep the "main" Page in TAB_1 and you can include some mini-Scroll Statement to your Loop Script on TAB_1. This Approach will be quicker as well than yours as it avoids the 2 'BACK' and Reload the previous Page..


i already tried that Extract method to open the link in TAB 2 but it also ends with fails when it reach the POS=30.. :(

Here is an example iim Extract code :
Code: Select all
VERSION BUILD=8970419 RECORDER=FX
SET !EXTRACT_TEST_POPUP NO
TAB T=1
WAIT SECONDS=1
SET !VAR1 1
ADD !VAR1 {{!LOOP}}
TAG POS={{!VAR1}} TYPE=IMG ATTR=SRC:https://pbs.twimg.com/profile_images/*.jpg EXTRACT=HREF
WAIT SECONDS=1
TAB OPEN
TAB T=2
URL GOTO={{!EXTRACT}}
TAG POS=1 TYPE=IMG ATTR=SRC:https://pbs.twimg.com/profile_images/*.jpg
ONDOWNLOAD FOLDER=* FILE=*
TAG POS=1 TYPE=IMG ATTR=SRC:https://pbs.twimg.com/profile_images/*.jpg CONTENT=EVENT:SAVEITEM
WAIT SECONDS=1
TAB T=1
TAB CLOSEALLOTHERS


and also the profile picture is too small in size when open the link in next tab

Open link in current TAB : picture
Image

Open link in nextTAB : picture
Image

anyway thanks for your valuable reply bro :) have a nice day
krkannan94
 
Posts: 19
Joined: Wed May 24, 2017 10:04 pm

Re: [HELP] Problem when download image

by chivracq on Thu Jun 01, 2017 6:24 am

Ah OK, good if you are already on v8.9.7 for FF then... (You understand I hope why I always insist on mentioning your exact FCI...! :wink: )

Well, about the 'POS=30', I still don't see any 'Scrolling' Statement in your Script..., well, if I'm correct that this Site requires some Scrolling to load more than the first 30 Profiles, you don't react on that "Assumption" from me, I tried to have a look but I cannot load this Site, I only get a Blank Page, dunno why...

For the final Image being too small, your 'EXTRACT=HREF' is probably grabbing only the "direct" URL of the Thumb Image on the main Page and not the URL of the Link on the Image.
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 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: 5730
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)


Return to iMacros for Firefox

Who is online

Users browsing this forum: Bing [Bot] and 6 guests

Website Monitoring