Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Everyone
I am trying to Load Data from https://www.baaa-acro.com/crash-archives but i keep getting an unkown error. With this code i got only 260 lines fetched
for i=1 to 1375
let vPage= 'https://www.baaa-acro.com/crash-archives' & if($(i)>1,$(i),'') & '.htm';
LOAD
//Image,
"Date",
Operator,
"A/C Type",
Location,
Fatalities,
Registration
//F8
FROM [lib://Aviation-Crashes]
(html, utf8, embedded labels, table is @1; //filters(
next
I then tried this code and only got to 1305 lines.
FOR vsCounter = 1 TO 1375
LET vsPage = If($(vsCounter) = 1, 20, 27488 + $(vsCounter) - 1);
LET vsURL = 'https://www.baaa-acro.com/crash-archives' & '$(vsPage)' & '.htm';
SET ErrorMode = 0;
LOAD
@2 AS [Date],
@3 AS [Operator],
@4 AS ["A/C Type"],
@5 AS [Location],
@6 AS [Fatalities],
@7 AS Registration
FROM [lib://Aviation-Crashes]
(html, utf8, no labels, table is @1);
// WHERE Recno() > 4;
SET ErrorMode = 1;
NEXT
I am not sure what the error is, if someone, anyone can help me please.
Hello,
The page parameter is not included in your url.
I made this video to show how I fixed it https://youtu.be/S0NG4vJ-j9w .
In short, find the script below:
for i=0 to 10
let vPage= 'https://www.baaa-acro.com/crash-archives?page=' & '$(i)';
Trace '$(i)';
LOAD
//Image,
'$(i)' as Page,
"Date",
Operator,
"A/C Type",
Location,
Fatalities,
Registration
//F8
FROM [lib://Aviation-Crashes]
(url is '$(vPage)',html, utf8, embedded labels, table is @1;
next i
Regards
Hello,
The page parameter is not included in your url.
I made this video to show how I fixed it https://youtu.be/S0NG4vJ-j9w .
In short, find the script below:
for i=0 to 10
let vPage= 'https://www.baaa-acro.com/crash-archives?page=' & '$(i)';
Trace '$(i)';
LOAD
//Image,
'$(i)' as Page,
"Date",
Operator,
"A/C Type",
Location,
Fatalities,
Registration
//F8
FROM [lib://Aviation-Crashes]
(url is '$(vPage)',html, utf8, embedded labels, table is @1;
next i
Regards