D
D
Danil2022-01-27 23:28:28
linux
Danil, 2022-01-27 23:28:28

What's wrong with a curl request?

I make a request with the command:

curl -s -H "User-agent: 'search bot'" https://www.reddit.com/r/TikTokCringe/top.json?limit=2 | grep url_overridden_by_dest | grep -Eoh "https:\/\/v\.redd\.it\/\w{13}"


It returns links to posts

But if I try to make a query like this:

curl -s -H "User-agent: 'search bot'" https://www.reddit.com/r/TikTokCringe/top.json?limit=2&t=week | grep url_overridden_by_dest | grep -Eoh "https:\/\/v\.redd\.it\/\w{13}"


It no longer returns links, although they are present in the json response. What's wrong with me writing?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
toxa82, 2022-01-27
@Deletron247

Wrap the URL in quotes, & is the control character in the console.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question