GHC 2018-10-09

5 comments.

, https://git.io/fxcy7 in jarun/googler
LGTM.

But, maybe I'm missing something obvious, but why are your results shown as

```
2 hello network  [hello.com]
Connect with people who share your interests. Discover communities you love. Join fun conversations.
```

rather than

```
1 hello network
https://hello.com/
Connect with people who share your interests. Discover communities you love. Join fun conversations.
```

? I don't recall any customization option like this.

Also, I don't get the card result

```
1 hello - YouTube  [www.youtube.com]
22 Aug 2017 - 3 min - Uploaded by Lauv about making a big move, falling in love for the first time, and figuring out your own identity while ...
```

(`--noua` or not). Card skipping code is not working for you?

, https://git.io/fxZpr in jarun/googler
In case I wasn't clear: when I said "make `not ua` code the only branch, remove old default branch", I was pointing to the new custom user agent should follow the application logic of what used to be `not ua`, since the server responses appear equivalent.

, https://git.io/fxZpo in jarun/googler
> However, as long as the new UA is not blocked let's keep it.

That's totally fine.

> I think --noua is more vulnerable to blocking than having a valid user agent.

I'm neutral on this point. "Might be more sensitive to blocking" was a comparison to a widely-adopted browser user agent.

, https://git.io/fxZAW in jarun/googler
Not planning to work on the code until later, but I just took a cursory look at what changed. The critical part that toasted the parser:

```html
<div class="r">
  <a href="https://hello.com/" onmousedown="return rwt(this,'','','','21','AOvVaw0uz_Rl7wUIyc4UYfxyyaFH','','2ahUKEwipj6uLp_jdAhWhmeAKHaC2AH4QFjAUegQICxAB','','',event)">
    <h3 class="LC20lb">hello network</h3><br>
    <div style="display:inline-block" class="TbwUpd"><cite class="iUh30">https://hello.com/</cite></div>
  </a>
  <!-- other shit -->
</div>
```

Compare this to classical layout (`--noua`):

```html
<h3 class="r"><a href="/url?q=https://hello.com/&amp;sa=U&amp;ved=0ahUKEwiq262zqfjdAhWwg-AKHeXMCG0QFghsMAo&amp;usg=AOvVaw3Mts57BoJM2EDR7KcNSz6e"><b>hello</b> network</a></h3>
<!-- other shit -->
```

This serious incompat will produce pretty confusing code.

Depending whether you want to go back to a real user agent, or just stick to the hot fix virtual user agent (more stable, but might be more sensitive to blocking):

- Use real user agent: will fix code, with (possibly very) confusing branching;
- Use virtual user agent: make `not ua` code the only branch, remove old default branch, since the virtual user agent isn't any different from no user agent from Google's POV; make `--noua` a legacy no op option.

@jarun Your choice.

, https://git.io/fxZAl in jarun/googler
Ah yeah, something unexpected came up Friday night so I put that aside and later forgot to return to it.

I'll see if I can squeeze some time tonight.