curl, wget do not return anything

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











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
















bumped to the homepage by Community♦ 8 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.














  • 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
















bumped to the homepage by Community♦ 8 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.














  • 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

37.1k1274118




37.1k1274118










asked Nov 26 '16 at 22:44









Alex Kasina

140119




140119





bumped to the homepage by Community♦ 8 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community♦ 8 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.













  • 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: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    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






























    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,352315




    1,352315











    • (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,067113258




        2,067113258










        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













































































            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay