curl, wget do not return anything











up vote
1
down vote

favorite












I am trying this curl -I zomato.com | head -n 1



and I am not getting any response.



% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 
0 0 0 0 0 0 0 0 --:- -:-- 0:05:29 --:- -:-- 0


Is the site protected by firewalls?



Even wget is not working on the site as well. Other sites like google.com are returning 200 response as expected.










share|improve this question
























  • works for me $ curl -I zomato.com | head -n 1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 HTTP/1.1 301 Moved Permanently
    – mikejonesey
    Nov 26 '16 at 22:48










  • @mikejonesey Wierd. Can you try wget https://www.zomato.com/bangalore/restaurants/dish-chicken-biryani
    – Alex Kasina
    Nov 26 '16 at 22:54

















up vote
1
down vote

favorite












I am trying this curl -I zomato.com | head -n 1



and I am not getting any response.



% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 
0 0 0 0 0 0 0 0 --:- -:-- 0:05:29 --:- -:-- 0


Is the site protected by firewalls?



Even wget is not working on the site as well. Other sites like google.com are returning 200 response as expected.










share|improve this question
























  • works for me $ curl -I zomato.com | head -n 1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 HTTP/1.1 301 Moved Permanently
    – mikejonesey
    Nov 26 '16 at 22:48










  • @mikejonesey Wierd. Can you try wget https://www.zomato.com/bangalore/restaurants/dish-chicken-biryani
    – Alex Kasina
    Nov 26 '16 at 22:54















up vote
1
down vote

favorite









up vote
1
down vote

favorite











I am trying this curl -I zomato.com | head -n 1



and I am not getting any response.



% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 
0 0 0 0 0 0 0 0 --:- -:-- 0:05:29 --:- -:-- 0


Is the site protected by firewalls?



Even wget is not working on the site as well. Other sites like google.com are returning 200 response as expected.










share|improve this question















I am trying this curl -I zomato.com | head -n 1



and I am not getting any response.



% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 
0 0 0 0 0 0 0 0 --:- -:-- 0:05:29 --:- -:-- 0


Is the site protected by firewalls?



Even wget is not working on the site as well. Other sites like google.com are returning 200 response as expected.







linux networking wget curl troubleshooting






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 27 '16 at 23:44









Rui F Ribeiro

38.2k1475123




38.2k1475123










asked Nov 26 '16 at 22:44









Alex Kasina

140119




140119












  • works for me $ curl -I zomato.com | head -n 1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 HTTP/1.1 301 Moved Permanently
    – mikejonesey
    Nov 26 '16 at 22:48










  • @mikejonesey Wierd. Can you try wget https://www.zomato.com/bangalore/restaurants/dish-chicken-biryani
    – Alex Kasina
    Nov 26 '16 at 22:54




















  • works for me $ curl -I zomato.com | head -n 1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 HTTP/1.1 301 Moved Permanently
    – mikejonesey
    Nov 26 '16 at 22:48










  • @mikejonesey Wierd. Can you try wget https://www.zomato.com/bangalore/restaurants/dish-chicken-biryani
    – Alex Kasina
    Nov 26 '16 at 22:54


















works for me $ curl -I zomato.com | head -n 1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 HTTP/1.1 301 Moved Permanently
– mikejonesey
Nov 26 '16 at 22:48




works for me $ curl -I zomato.com | head -n 1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 HTTP/1.1 301 Moved Permanently
– mikejonesey
Nov 26 '16 at 22:48












@mikejonesey Wierd. Can you try wget https://www.zomato.com/bangalore/restaurants/dish-chicken-biryani
– Alex Kasina
Nov 26 '16 at 22:54






@mikejonesey Wierd. Can you try wget https://www.zomato.com/bangalore/restaurants/dish-chicken-biryani
– Alex Kasina
Nov 26 '16 at 22:54












2 Answers
2






active

oldest

votes

















up vote
0
down vote













$ curl -I --max-redirs 1 "https://www.zomato.com/" 2>/dev/null  | grep "^location:" | awk '{print $2}'
https://www.zomato.com/some-location-in-mongolia


so...



$ newURL=$(curl -I --max-redirs 1 "https://www.zomato.com/" 2>/dev/null  | grep "^location:" | awk '{print $2}'| grep -o ".*[a-z]"); curl -I "$newURL" | head -n 1
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0
HTTP/2 200


not sure assisting with scrapping is allowed on this forum, but;



wget --header "User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0" --header "Host: www.zomato.com" --header "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" "https://www.zomato.com/bangalore/restaurants/biryani"





share|improve this answer























  • (perhaps your curl is not following redirects?)
    – mikejonesey
    Nov 26 '16 at 23:00










  • Can you try wget https://www.zomato.com/bangalore/restaurants/dish-chicken-bi‌​ryani
    – Alex Kasina
    Nov 26 '16 at 23:05










  • that is a 404 in web browser
    – mikejonesey
    Nov 26 '16 at 23:29










  • zomato.com/bangalore/restaurants/dish-chicken-biryani or just https://www.zomato.com/bangalore/
    – Alex Kasina
    Nov 26 '16 at 23:43












  • see edit, (add some headers to wget)
    – mikejonesey
    Nov 26 '16 at 23:58


















up vote
0
down vote













did it work for you? It is working from my local machine but when I try from aws serves it gets stuck and does not return anything. I am running below command:




curl -v 'https://www.zomato.com/' -H 'accept-encoding: gzip, deflate, sdch, br' -H 'accept-language: en-US,en;q=0.8' -H 'upgrade-insecure-requests: 1' -H 'user-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0' -H 'accept:
text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'cache-control: max-age=0' -H 'authority: www.zomato.com' --compressed







share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "106"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














     

    draft saved


    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f326272%2fcurl-wget-do-not-return-anything%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    $ curl -I --max-redirs 1 "https://www.zomato.com/" 2>/dev/null  | grep "^location:" | awk '{print $2}'
    https://www.zomato.com/some-location-in-mongolia


    so...



    $ newURL=$(curl -I --max-redirs 1 "https://www.zomato.com/" 2>/dev/null  | grep "^location:" | awk '{print $2}'| grep -o ".*[a-z]"); curl -I "$newURL" | head -n 1
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0
    HTTP/2 200


    not sure assisting with scrapping is allowed on this forum, but;



    wget --header "User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0" --header "Host: www.zomato.com" --header "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" "https://www.zomato.com/bangalore/restaurants/biryani"





    share|improve this answer























    • (perhaps your curl is not following redirects?)
      – mikejonesey
      Nov 26 '16 at 23:00










    • Can you try wget https://www.zomato.com/bangalore/restaurants/dish-chicken-bi‌​ryani
      – Alex Kasina
      Nov 26 '16 at 23:05










    • that is a 404 in web browser
      – mikejonesey
      Nov 26 '16 at 23:29










    • zomato.com/bangalore/restaurants/dish-chicken-biryani or just https://www.zomato.com/bangalore/
      – Alex Kasina
      Nov 26 '16 at 23:43












    • see edit, (add some headers to wget)
      – mikejonesey
      Nov 26 '16 at 23:58















    up vote
    0
    down vote













    $ curl -I --max-redirs 1 "https://www.zomato.com/" 2>/dev/null  | grep "^location:" | awk '{print $2}'
    https://www.zomato.com/some-location-in-mongolia


    so...



    $ newURL=$(curl -I --max-redirs 1 "https://www.zomato.com/" 2>/dev/null  | grep "^location:" | awk '{print $2}'| grep -o ".*[a-z]"); curl -I "$newURL" | head -n 1
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0
    HTTP/2 200


    not sure assisting with scrapping is allowed on this forum, but;



    wget --header "User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0" --header "Host: www.zomato.com" --header "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" "https://www.zomato.com/bangalore/restaurants/biryani"





    share|improve this answer























    • (perhaps your curl is not following redirects?)
      – mikejonesey
      Nov 26 '16 at 23:00










    • Can you try wget https://www.zomato.com/bangalore/restaurants/dish-chicken-bi‌​ryani
      – Alex Kasina
      Nov 26 '16 at 23:05










    • that is a 404 in web browser
      – mikejonesey
      Nov 26 '16 at 23:29










    • zomato.com/bangalore/restaurants/dish-chicken-biryani or just https://www.zomato.com/bangalore/
      – Alex Kasina
      Nov 26 '16 at 23:43












    • see edit, (add some headers to wget)
      – mikejonesey
      Nov 26 '16 at 23:58













    up vote
    0
    down vote










    up vote
    0
    down vote









    $ curl -I --max-redirs 1 "https://www.zomato.com/" 2>/dev/null  | grep "^location:" | awk '{print $2}'
    https://www.zomato.com/some-location-in-mongolia


    so...



    $ newURL=$(curl -I --max-redirs 1 "https://www.zomato.com/" 2>/dev/null  | grep "^location:" | awk '{print $2}'| grep -o ".*[a-z]"); curl -I "$newURL" | head -n 1
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0
    HTTP/2 200


    not sure assisting with scrapping is allowed on this forum, but;



    wget --header "User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0" --header "Host: www.zomato.com" --header "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" "https://www.zomato.com/bangalore/restaurants/biryani"





    share|improve this answer














    $ curl -I --max-redirs 1 "https://www.zomato.com/" 2>/dev/null  | grep "^location:" | awk '{print $2}'
    https://www.zomato.com/some-location-in-mongolia


    so...



    $ newURL=$(curl -I --max-redirs 1 "https://www.zomato.com/" 2>/dev/null  | grep "^location:" | awk '{print $2}'| grep -o ".*[a-z]"); curl -I "$newURL" | head -n 1
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0
    HTTP/2 200


    not sure assisting with scrapping is allowed on this forum, but;



    wget --header "User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0" --header "Host: www.zomato.com" --header "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" "https://www.zomato.com/bangalore/restaurants/biryani"






    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Nov 26 '16 at 23:58

























    answered Nov 26 '16 at 22:57









    mikejonesey

    1,362415




    1,362415












    • (perhaps your curl is not following redirects?)
      – mikejonesey
      Nov 26 '16 at 23:00










    • Can you try wget https://www.zomato.com/bangalore/restaurants/dish-chicken-bi‌​ryani
      – Alex Kasina
      Nov 26 '16 at 23:05










    • that is a 404 in web browser
      – mikejonesey
      Nov 26 '16 at 23:29










    • zomato.com/bangalore/restaurants/dish-chicken-biryani or just https://www.zomato.com/bangalore/
      – Alex Kasina
      Nov 26 '16 at 23:43












    • see edit, (add some headers to wget)
      – mikejonesey
      Nov 26 '16 at 23:58


















    • (perhaps your curl is not following redirects?)
      – mikejonesey
      Nov 26 '16 at 23:00










    • Can you try wget https://www.zomato.com/bangalore/restaurants/dish-chicken-bi‌​ryani
      – Alex Kasina
      Nov 26 '16 at 23:05










    • that is a 404 in web browser
      – mikejonesey
      Nov 26 '16 at 23:29










    • zomato.com/bangalore/restaurants/dish-chicken-biryani or just https://www.zomato.com/bangalore/
      – Alex Kasina
      Nov 26 '16 at 23:43












    • see edit, (add some headers to wget)
      – mikejonesey
      Nov 26 '16 at 23:58
















    (perhaps your curl is not following redirects?)
    – mikejonesey
    Nov 26 '16 at 23:00




    (perhaps your curl is not following redirects?)
    – mikejonesey
    Nov 26 '16 at 23:00












    Can you try wget https://www.zomato.com/bangalore/restaurants/dish-chicken-bi‌​ryani
    – Alex Kasina
    Nov 26 '16 at 23:05




    Can you try wget https://www.zomato.com/bangalore/restaurants/dish-chicken-bi‌​ryani
    – Alex Kasina
    Nov 26 '16 at 23:05












    that is a 404 in web browser
    – mikejonesey
    Nov 26 '16 at 23:29




    that is a 404 in web browser
    – mikejonesey
    Nov 26 '16 at 23:29












    zomato.com/bangalore/restaurants/dish-chicken-biryani or just https://www.zomato.com/bangalore/
    – Alex Kasina
    Nov 26 '16 at 23:43






    zomato.com/bangalore/restaurants/dish-chicken-biryani or just https://www.zomato.com/bangalore/
    – Alex Kasina
    Nov 26 '16 at 23:43














    see edit, (add some headers to wget)
    – mikejonesey
    Nov 26 '16 at 23:58




    see edit, (add some headers to wget)
    – mikejonesey
    Nov 26 '16 at 23:58












    up vote
    0
    down vote













    did it work for you? It is working from my local machine but when I try from aws serves it gets stuck and does not return anything. I am running below command:




    curl -v 'https://www.zomato.com/' -H 'accept-encoding: gzip, deflate, sdch, br' -H 'accept-language: en-US,en;q=0.8' -H 'upgrade-insecure-requests: 1' -H 'user-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0' -H 'accept:
    text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'cache-control: max-age=0' -H 'authority: www.zomato.com' --compressed







    share|improve this answer



























      up vote
      0
      down vote













      did it work for you? It is working from my local machine but when I try from aws serves it gets stuck and does not return anything. I am running below command:




      curl -v 'https://www.zomato.com/' -H 'accept-encoding: gzip, deflate, sdch, br' -H 'accept-language: en-US,en;q=0.8' -H 'upgrade-insecure-requests: 1' -H 'user-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0' -H 'accept:
      text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'cache-control: max-age=0' -H 'authority: www.zomato.com' --compressed







      share|improve this answer

























        up vote
        0
        down vote










        up vote
        0
        down vote









        did it work for you? It is working from my local machine but when I try from aws serves it gets stuck and does not return anything. I am running below command:




        curl -v 'https://www.zomato.com/' -H 'accept-encoding: gzip, deflate, sdch, br' -H 'accept-language: en-US,en;q=0.8' -H 'upgrade-insecure-requests: 1' -H 'user-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0' -H 'accept:
        text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'cache-control: max-age=0' -H 'authority: www.zomato.com' --compressed







        share|improve this answer














        did it work for you? It is working from my local machine but when I try from aws serves it gets stuck and does not return anything. I am running below command:




        curl -v 'https://www.zomato.com/' -H 'accept-encoding: gzip, deflate, sdch, br' -H 'accept-language: en-US,en;q=0.8' -H 'upgrade-insecure-requests: 1' -H 'user-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0' -H 'accept:
        text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'cache-control: max-age=0' -H 'authority: www.zomato.com' --compressed








        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Dec 19 '16 at 8:53









        Kevdog777

        2,082123258




        2,082123258










        answered Dec 19 '16 at 8:33









        Neha

        11




        11






























             

            draft saved


            draft discarded



















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f326272%2fcurl-wget-do-not-return-anything%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Morgemoulin

            Scott Moir

            Souastre