Reddit permalinks from the JSON feed via jq
Below is a oneliner that will retrieve Reddit permalinks from a specific subbreddit’s JSON feed by using jq.
$ wget -O - -q 'https://www.reddit.com/r/worldnews/new.json' | jq '..|.permalink? | select(.)'
"/r/worldnews/comments/hj56lb/on_behalf_of_27_countries_uk_issues_joint/"
"/r/worldnews/comments/hj552s/first_hong_kong_arrest_under_chinas_new_law_is/"
"/r/worldnews/comments/hj54v5/india_successfully_exports_casteism_to_the_usa/"
"/r/worldnews/comments/hj54kf/taiwan_opens_office_to_help_people_fleeing_hong/"
"/r/worldnews/comments/hj53qm/indias_tiktok_alternative_chingari_app_sees_100k/"
...
Or, to retrieve the actual link:
$ wget -O - -q 'https://www.reddit.com/r/worldnews/new.json' | jq '..|.url? | select(.)'
"https://www.gov.uk/government/speeches/un-human-rights-council-44-cross-regional-statement-on-hong-kong-and-xinjiang"
"https://www.newsweek.com/china-first-arrest-under-new-hong-kong-law-man-independence-flag-1514579"
"https://www.indiatoday.in/world/story/california-cisco-job-discrimination-indian-employee-caste-1695767-2020-07-01"
"https://www.reuters.com/article/us-hongkong-protests-taiwan-idUSKBN242445"
"https://www.indiatoday.in/technology/news/story/chingari-crosses-1-million-downloads-on-play-store-as-tiktok-stops-working-1695735-2020-07-01"
...