> there is no News for Google Denmark.
Wha...

> I don't know Python...
Sure. You know what, you don't need to know Python to be useful here. You only need to know how to use curl to do HTTP stuff. Even if you don't, you can copy as curl from DevTools, paste into your terminal, and just try to add or remove `-H` options until there's a visible difference in the number of results. So please do give that a try if you have time.
One more note: this is more localized than I thought, probably only localized to www.google.dk in Danish. Even specifying the English language result in something:
```
$ googler -d --news -c dk --json -t d5 -n 3 --np -C yes
[DEBUG] Version 3.1
[DEBUG] Connecting to new host www.google.dk
[DEBUG] Fetching URL /search?ie=UTF-8&num=3&oe=UTF-8&q=yes&tbm=nws&tbs=qdr:d5
[DEBUG] Cookie: NID=105=A5mRZQdm3H2KgmEnk4MsXmdxRxoBdWGi7ttncdnVSfjiKitQOjBvfG9M3whbZQfR1E36GdwKmrQRG7x5YromDQVbzXTi001Whsga1MmLOo1JnPubTpsUl2Dfvvve0seP
[DEBUG] Response body written to '/Volumes/ramdisk/googler-response-bgql3tx0'.
[]
$ googler -d --news -c dk -l en --json -t d5 -n 3 --np -C yes
[DEBUG] Version 3.1
[DEBUG] Connecting to new host www.google.dk
[DEBUG] Fetching URL /search?hl=en&ie=UTF-8&num=3&oe=UTF-8&q=yes&tbm=nws&tbs=qdr:d5
[DEBUG] Cookie: NID=105=MTULkvHieSfgvHolpdz0tc6_LLXALD5wtPd7sJQzy4S28guZ1_W1nwPFmaL9dAF7aB_t28mDHgdCAJ9PqwcS0LMJTIgHeaPyS3IKhqBLIVcGcStNXPzRcMb6L0zxtfra
[DEBUG] Response body written to '/Volumes/ramdisk/googler-response-iua0_7rg'.
[
{
"abstract": "Ratings released by Nielsen on Thursday showed that viewership of the team's games on YES is up 50 percent for the first two months of the season ...",
"metadata": "New York Post, 6 hours ago",
"title": "Aaron Judge-led Yankees a ratings success for YES",
"url": "http://nypost.com/2017/06/09/aaron-judge-led-yankees-a-ratings-success-for-yes/"
},
{
"abstract": "From now until the time he retires, LeBron James' free agency decisions will be covered with the fervor of a presidential election or, say, an NBA prospect's ...",
"metadata": "Complex, 13 hours ago",
"title": "LeBron James to the Lakers? Yes, This Is a Rumor That's Actually ...",
"url": "http://www.complex.com/sports/2017/06/lebron-james-2018-free-agency-rumors-lakers"
},
{
"abstract": "Koby Gal-Raday will report to Yes CEO Ron Eilon and will oversee all aspects of business, including originals development, production, programming, content ...",
"metadata": "C21Media, 3 hours ago",
"title": "ProSieben alum joins Israel's Yes",
"url": "https://www.c21media.net/prosieben-alum-joins-israels-yes/"
}
]
```
I bow out until there's something actionable that don't require half an hour or more on my part.
Thanks, I know how to use Developer Tools, or I wouldn't have been contributing to googler. Didn't I say
> but I don't have time to experiment with all the headers. Maybe you could try that.
No, that meta refresh is wrapped in a noscript tag. No redirect if you have JavaScript turned on.
And I tried to add the `gbv` and `sei` query params. No, following the meta refresh doesn't magically yield results.
<s>Since you sometimes see results and sometimes don't, I'm tempted to say that www.google.dk is just fucking with users.</s> (Update: I just realized you were seeing results only when there's no `--news` on the command line. So scratch this.) The fact that when I visit https://www.google.dk/search?ie=UTF-8&num=3&oe=UTF-8&q=Election&tbm=nws&tbs=qdr:d5 in the browser (with JavaScript turned off) I always seem to get something is eluding me at the moment, but I don't have time to experiment with all the headers. Maybe you could try that.
> I agree that meta parsing will make the whole thing more convoluted but I think the options are limited here.
> But if Python has some xslt/xpath stuff built into it it might be somewhat feasible to parse one specific Meta header.
There's separation of concern in googler where the HTTP part fetches HTML and hands over to the HTML parser which works strictly offline and in a reproducible way. That's why we have `devbin/parse` which works reproducibly on any debug response. Having to interpret meta http-equiv means HTTP stuff now bleeds into the HTML part and the whole model basically needs to be rearchitected. It's not about fishing out the redirect URL (which isn't a technical challenge, although it could be painful), and it's more complicated than you'd think.
Fortunately, following the redirect doesn't seem to actually work, as mentioned above.
Another side note: I have reposted the response in `googler-response-h7zbmw3o.zip` as <https://gist.githubusercontent.com/anonymous/c01d4eeb6c5aef60db09ad8a07407d67/raw/de8ba28f9a7a09afc0fa0b6c8b47c952f4fad702/googler-response-h7zbmw3o>. zip is just too hostile.
By the way, there's a meta refresh in the response:
```
<meta content="0;url=/search?q=Election&tbm=nws&tbs=qdr:d5&gbv=1&sei=gFc6Wf6ZCsWlwQLk34DYBg" http-equiv="refresh">
```
If we follow that refresh it might work. Not sure I want to step into the business of parsing meta tags though.
I can reproduce, but only with the .dk TLD.
```
$ googler -d --news -c dk --json -t d5 -n 3 --np -C Election
[DEBUG] Version 3.1
[DEBUG] Connecting to new host www.google.dk
[DEBUG] Fetching URL /search?ie=UTF-8&num=3&oe=UTF-8&q=Election&tbm=nws&tbs=qdr:d5
[DEBUG] Cookie: NID=105=AOZYE_Qf4J5XgrUYG3eQlHCUnMfWK0RfInle1F8NX_WUNV5urfkvUspK-Byk5j1VNGTqhY1yt7VfM0PpItHNcGGyInKVBzMvcIsoH6USxqxjSQEa92nDU6-_HV1JMz0N
[DEBUG] Response body written to '/Volumes/ramdisk/googler-response-jhy042p0'.
[]
```
In the response, there's a message
> Din søgning – Election – kunne ikke gennemføres med de valgte søgeindstillinger.
and according to Google Translate, it means
> Your search - Election - could not be completed with the selected search settings.
I tried a whole bunch of other TLDs and they all work just fine. Not sure what's going on with the Danish version of Google.
srm 1.2.15 (new formula)
========================
- [x] Have you followed the [guidelines for contributing](https://github.com/Homebrew/homebrew-core/blob/master/CONTRIBUTING.md)?
- [x] Have you checked that there aren't other open [pull requests](https://github.com/Homebrew/homebrew-core/pulls) for the same formula update/change?
- [x] Have you built your formula locally with `brew install --build-from-source <formula>`, where `<formula>` is the name of the formula you're submitting?
- [x] Does your build pass `brew audit --strict <formula>` (after doing `brew install <formula>`)?
-----
(Mac) OS X shipped with `srm(1)` from the [10.3](https://opensource.apple.com/release/mac-os-x-1039.html) era all the way to [10.11](https://opensource.apple.com/release/os-x-10116.html), but `srm` was somehow dropped when the operating system was renamed macOS...
I still want the peace of mind when deleting a key from disk, though.