Ondownload retrieves an .aspx file instead of .xls

Discussions and Tech Support related to website data extraction, screen scraping and data mining using iMacros.

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.

Ondownload retrieves an .aspx file instead of .xls

by harpyseal on Sun Mar 06, 2016 6:37 pm

Hi,
I am trying to download an .xls file from https://www.altisource.com/MortgageServ ... vices.aspx
When I click manually on the link it downloads correctly.
When I use OnDownload in a script, I get an .aspx file which looks like the HTML of the page rather than the real download.
When I script the imacros using DS, same thing.
Has anyone seen this before?

Macros 10.4.28.1074 Windows 7.
harpyseal
 
Posts: 3
Joined: Mon Aug 31, 2015 5:41 pm

Re: Ondownload retrieves an .aspx file instead of .xls

by chivracq on Tue Mar 08, 2016 3:06 pm

harpyseal wrote:Hi,
I am trying to download an .xls file from https://www.altisource.com/MortgageServ ... vices.aspx
When I click manually on the link it downloads correctly.
When I use OnDownload in a script, I get an .aspx file which looks like the HTML of the page rather than the real download.
When I script the imacros using DS, same thing.
Has anyone seen this before?

Code: Select all
Macros 10.4.28.1074 Windows 7.

Hum..., I wanted to give a try to your Site but I don't see any File to download on the Page you linked to and the rest of the Site looks like it is behind L&P...

You could maybe try with IE and/or FF to see if you get the same Behaviour...
(On FF, you may have to select Download to the Default Download Folder, as downloading '.XLS' and '.PDF' was a bit problematic a while ago when trying to specify a Download Folder/Path with 'ONDOWNLOAD' and I'm not sure if it is working correctly now in the latest iMacros for FF Version (v8.9.6)...)
- (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: 6489
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Ondownload retrieves an .aspx file instead of .xls

by harpyseal on Tue Mar 08, 2016 11:37 pm

Thank you for the suggestion!
I've never tried iMacros for FF or IE, pretty much because I've never had to. Does it work similar to imacros where I can call the script from a batch file? I will give it a try. I'm not able to post logon info here, but let me see if I can create my own account into the site and follow up.
harpyseal
 
Posts: 3
Joined: Mon Aug 31, 2015 5:41 pm

Re: Ondownload retrieves an .aspx file instead of .xls

by chivracq on Wed Mar 09, 2016 3:10 am

harpyseal wrote:Thank you for the suggestion!
I've never tried iMacros for FF or IE, pretty much because I've never had to. Does it work similar to imacros where I can call the script from a batch file? I will give it a try. I'm not able to post logon info here, but let me see if I can create my own account into the site and follow up.

For me it's the other way round, I've never used the iMB and I use (mainly/solely) iMacros for FF (and IE or CR only to investigate Pb's when Users on the Forum have Pb's specifically related to those 2 Versions...), a.o. to call '.iim' Macros from a '.BAT' File as well (launched from the Windows (WinXP + Win7 + Win10) Task Scheduler. The Syntax is the same, you obviously have to adapt the Path to the IE or FF '.EXE' (and specify the FF Profile on FF if you work with several Profiles). Only Limitation compared to iMB is that you cannot pass Variables from your '.BAT' File to iMacros. Workaround is to use the Clipboard or some mini '.INI' / '.TXT' / '.CSV' File as a (second) DataSource...

There are a few Differences further between iMB and iMacros for FF and/or IE (and/or CR, but iMacros for CR has always been a bit buggy and many Commands are not implemented, so I would advise to avoid it...!), check the Wiki and especially the Command Reference..., for example the DS Mode is only for iMB, but on the other hand, the EVENT Mode was for long only for FF (+ now implemented in iMB v11 as well), in FF you can use the Power of JavaScript for '.js' Scripts for Conditional Behaviour which is very powerful (even if I don't use that personally, I prefer to code all my Conditional Logic in pure '.iim').

But...!, maybe important for you, as I mentioned in my previous Reply, downloading '.XLS' and '.PDF' Files with 'ONDOWNLOAD' on FF was a bit problematic a while ago, there are several Threads on the Forum about it, you could only download to the Default FF Download Folder (and had to use some Batch File for renaming/moving the Files afterwards, which could be a bit cumbersome) and I'm not sure if that Functionality has been a bit improved in the latest 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: 6489
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)


Return to Data Extraction and Web Screen Scraping

Who is online

Users browsing this forum: Bing [Bot] and 1 guest

-->