Add time_it decorator to profile the most time-consuming methods in debug mode
==============================================================================
Could be useful for getting a sense of the rough performance of things without pulling out a full blown profiler.
Timing example on a really crappy Linux box:
<img width="491" alt="Screen Shot 2020-10-10 at 10 06 00 PM" src="https://user-images.githubusercontent.com/4149852/95657174-8e1f5880-0b45-11eb-9147-e01d0dbfd279.png">
Related: #382.
Wait, was this change intentional? Just noticed that [Python 3.10 docs](https://docs.python.org/3.10/library/functions.html), rendered with Sphinx 3.2.1, features background color-less code blocks.
In any case I certainly prefer the old style.
Fix metadata parsing
====================
Metadata parsing is so damn unreliable now, that the fields detection already
broke after a few days. I've no choice but to use a magic class now, which
could break any second.
Also, turns out this flaky metadata node detector also has the tendency to pick
up non-metadata crap like sublinks and in certain cases, entire accordians of
stuff (like announcements under certain covid results). Slap some bandages on
top to exclude those.
Replace em dash in metadata
===========================
Google is now using U+2014 EM DASH instead of U+002D HYPHEN MINUS as separator, at least sometimes.
Sorry about the delay. This is fixed in #379. With the fix applied, your attached HTML is parsed correctly:
```console
$ ./googler --debug --parse /tmp/googler-response-_jgskry4.html
[DEBUG] googler version 4.2
[DEBUG] Python version 3.9.0
[DEBUG] Platform: macOS-10.15.7-x86_64-i386-64bit
1. The Varsity: What'll ya Have!
https://www.thevarsity.com/
EffectiveTuesday June 16th , in accordance with Governor Kemp's latest executive order, The Varsity Atlanta will be reopening our downstairs dining
rooms.
2. The Varsity Atlanta - The Varsity
https://www.thevarsity.com/locations/detail/1/The_Varsity_Atlanta
The Varsity in downtown Atlanta is our original, world famous location. This enormous restaurant sits on 2 city blocks and can accommodate 800 diners
inside.
3. Our Food - The Varsity
https://www.thevarsity.com/food
... with Governor Kemp's latest executive order, The Varsity Atlanta will be reopening ... And can you really say you went to The Varsity if you didn't
get a Frosted ... One burger with chili and cheese, one hot dog with mustard, chili, and cheese.
4. The Varsity - Wikipedia
https://en.wikipedia.org/wiki/The_Varsity
The Varsity is a restaurant chain, iconic in the modern culture of Atlanta, Georgia. The main ... Mad artist Jack Davis has done advertising for The
Varsity. The Varsity was featured in the PBS documentary A Hot Dog Program by Rick Sebak.
5. The Varsity - Takeout & Delivery - 1454 Photos & 2070 ... - Yelp
https://www.yelp.com/biz/the-varsity-atlanta-2
Rating: 3, 2,070 reviews, Price range: Under $10
$Inexpensive• Burgers, Hot Dogs, Fast Food. Open • 10:30 am - 11:00 ... Chili Cheese Dog, Chili Slaw Dog, Chili Burger, Fried Apple Pie, Chili Cheese
Slaw Dog, Chili Cheese Burger, Naked Dog ... The Varsity is simply one of Atlanta's icons.
6. The Varsity - Takeout & Delivery - 140 Photos & 157 Reviews ...
https://www.yelp.com/biz/the-varsity-atlanta-5
Rating: 2.5, 157 reviews, Price range: Under $10
... of The Varsity "Tasty and less expensive than I'd expect for airport fast food. The food is similar to another hot dog place in Atlanta, Zesto.
Friendly employees.
7. The Varsity- Atlanta's Favorite Hotdogs and Hamburgers
https://www.atlanta.net/partner/the-varsity/296/
Try the chili dogs, onion rings, Frosted Orange milkshake and homemade fried pies. The Varsity has been serving Atlanta's favorite hotdogs and
hamburgers ...
8. 91 years of chili dogs: How Atlanta's The Varsity lasts and lasts
https://thetakeout.com/atlanta-the-varsity-chili-dogs-1835785500
Jul 7, 2019
Alongside their famous chili dogs, The Varsity's menu is a model of classic American drive-in fare. It's all hot dogs, hamburgers, fries, and onion ...
9. THE VARSITY, Atlanta - 61 North Ave NW, Downtown - Menu ...
https://www.tripadvisor.com/Restaurant_Review-g60898-d492279-Reviews-The_Varsity-Atlanta_Georgia.html
Rating: 4, 5,457 reviews, Price range: $
The Varsity, Atlanta: See 5457 unbiased reviews of The Varsity, rated 4 of 5 on Tripadvisor and ranked ... Yes 100% all beef hot dogs, and yes they do
have chili!
10. The Varsity - Home | Facebook
https://www.facebook.com/thevarsity/
Rating: 4.3, 26,269 votes
Come be a part of an Atlanta tradition! The Varsity is a 92-year-old family-owned and operated company. We treat our team members like family. We are
looking to ...
```
DOM builder: fix parsing of foreign elements
============================================
Update dim. Most importantly:
[3d5533bb](https://github.com/zmwangx/dim/commit/3d5533bbf551d16e73b38512e3a1db4f19631911) Fix parsing of foreign (e.g. svg namespace) elements
This fixes #366.
Fix codebgcolor and codetextcolor for Sphinx 3.1.0+
===================================================
Sphinx 3.1.0+ dropped the custom `codebgcolor` and `codetextcolor` from the classic theme (see commit https://github.com/sphinx-doc/sphinx/commit/b345acc2840a792162845e3a1a3456c347fac08e), leaving pre elements uncolored.
Without the fix:
<img width="815" alt="Screen Shot 2020-10-10 at 11 14 05 AM" src="https://user-images.githubusercontent.com/4149852/95644512-b8dbc380-0ae9-11eb-8dcd-05ccacf91914.png">
Should be:
<img width="811" alt="Screen Shot 2020-10-10 at 11 15 19 AM" src="https://user-images.githubusercontent.com/4149852/95644537-e45eae00-0ae9-11eb-874f-feeb15332eb5.png">