How do I create a newsapi command from this link 🤔

Asked Sep 20, 2020·3 replies·Last activity 5 years ago·Open in Discord ↗
Archived from the original community forum
Things may have changed since it was written. Still stuck? Ask the community on Discord.

Hi

How do I create a newsapi command from this link 🤔

http://newsapi.org/v2/everything? q=bitcoin &from=2020-08-19&sortBy=publishedAt&apiKey=d9aba179a91540849e276fae0138e031

$(eval $(urlfetch json [http://newsapi.org/v2/everything? q=bitcoin &from=2020-08-19&sortBy=publishedAt&apiKey=d9aba179a91540849e276fae0138e031))) 😶

(youtube user not for Twitch)

Please help 😔✌

3 replies

Hey @Witty Panda!

Well, it depends of the data you want to extract...
The data you pull is in the JSON format, paste the URL in your browser to have a look:

$(eval $(urlfetch json http://newsapi.org/v2/everything?q=bitcoin&sortBy=publishedAt&apiKey=d9aba179a91540849e276fae0138e031))

This is the basics, but to navigate within the JSON you need to use proper notation, learn more here.

You'll probably notice that I removed the &from=2020-08-19 of the URL, it's because it doesn't seem to be needed as it doesn't impact the results, and it could lead to errors.

thanks for reply

$(eval $(urlfetch jsonhttps://rss.dw.com/atom/rss-de-cul-buch))

I would like to extract the data between these marks from this link👆... Example <![CDATA[ I need help I need help I need help I need help I need help ]]>

Thanks again for the help🤗

(youtube user )

Capture.PNG