Re: Decoding a web page

Dave Close <[email protected]>
Newsgroups gmane.linux.redhat.fedora.general
Message-ID <[email protected]>
Samuel Sieb wrote:

>Curl is somehow breaking things.  The response to that request is a 302 
>redirect to another url.  You need to add the -L option for curl to 
>follow the redirect.  However, if you use curl on that url it gets a 
>404.  I have no idea what it's doing, but it's somehow sending the wrong 
>request.  wget works though.
>
>wget --content-disposition "long url here"
>
>That will download the csv file and give it the right name.  If you want 
>that name, you could try grepping the wget output for "Saving".  I can't 
>test that now because your token has expired.  Probably better to just 
>write the output to a file you specify instead.

Thanks muchly! I had missed the --content-disposition option, never
needed it before. With it, things work exactly as they should.

I absolutely need the correct file name as I get multiple messages like
this referencing different sensors. The file name tells me which one.
Without that, the data is almost useless.
-- 
         Dave Close, Compata, Irvine CA       +1 714 434 7359
       [email protected]              [email protected]
     "Resentment is like drinking poison and then hoping it will
      kill your enemies." -- Nelson Mandela


-- 
_______________________________________________
users mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam, report it: https://forge.fedoraproject.org/infra/tickets/issues/new
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.