lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

I think this is very simple.

You are doing an HTTP request.

The server responds with (in effect, sling your hook, use HTTPS), and
redirects to to HTTPS.

LuaSocket does not as standard do HTTPS, requires an add on. You have to use HTTPS by some means.

This is perfectly normal web behaviour.

On 24/11/2015 19:47, Geoff Smith wrote:

I have used Lua ocket to get a few web pages downloaded in the past
without a problem, but have hit a snag with a specific webpage I am
trying to download.

I am trying to extract some data from the Betfair homepage.

local webText = http.request([[]])

I get back a small chunk of html which contains the text "The
document you requested has moved to a new location.  The new location
is "";

This is the exact url link I passed to the function, so cant
understand why the problem is occurring.  If I view that site in any
browser it displays the full web page without needing me to register
or login or anything like that.

So the Server is detecting I am not using a browser and not giving me
the page I require. I have tried tinkering with the headers sent by
LuaSocket to make it look more like a Firefox request but to no

Could anyone offer a suggestion as to what I need to do to fix this
problem please.

Thanks for any assistance.

Regards Geoff