11diff --git a/Makefile b/Makefile
2- index deadfe2..46abab2 100644
2+ index deadfe2..be18286 100644
33--- a/Makefile
44+++ b/Makefile
55@@ -230,7 +230,7 @@ indexes:
@@ -34,7 +34,7 @@ index deadfe2..46abab2 100644
3434- ./export.py --url=http://en.cppreference.com/mwiki reference/cppreference-export-ns0,4,8,10.xml 0 4 8 10
3535+ ./export.py --url=https://zh.cppreference.com/mwiki reference/cppreference-export-ns0,4,8,10.xml 0 4 8 10
3636diff --git a/commands/preprocess.py b/commands/preprocess.py
37- index ed67174..ada56fe 100644
37+ index ed67174..aec036c 100644
3838--- a/commands/preprocess.py
3939+++ b/commands/preprocess.py
4040@@ -40,15 +40,15 @@ def rearrange_archive(root):
@@ -66,6 +66,15 @@ index ed67174..ada56fe 100644
6666 path = os.path.join(root, lang + ".cppreference.com/")
6767 src_html_path = path + "w/"
6868 src_data_path = path + "mwiki/"
69+ @@ -77,7 +77,7 @@ def rearrange_archive(root):
70+ shutil.copy(os.path.join(path, 'favicon.ico'), data_path)
71+
72+ # remove what's left
73+ - shutil.rmtree(path)
74+ + # shutil.rmtree(path)
75+
76+ # remove the XML source file
77+ for fn in fnmatch.filter(os.listdir(root), 'cppreference-export*.xml'):
6978@@ -214,7 +214,7 @@ def has_class(el, classes_to_check):
7079 return False
7180
@@ -75,8 +84,19 @@ index ed67174..ada56fe 100644
7584 html = etree.parse(fn, parser)
7685
7786 # remove non-printable elements
87+ @@ -236,7 +236,9 @@ def preprocess_html_file(root, fn, rename_map):
88+ for el in html.xpath('/html/body/script'):
89+ if el.get('src') is not None and 'google-analytics.com/ga.js' in el.get('src'):
90+ el.getparent().remove(el)
91+ - elif el.text is not None and ('google-analytics.com/ga.js' in el.text or 'pageTracker' in el.text):
92+ + elif el.text is not None and ('google-analytics.com/ga.js' in el.text or 'pageTracker' in el.text or '_trackPageview' in el.text):
93+ + el.getparent().remove(el)
94+ + elif el.get('src') is not None and 'carbonads.com/carbon.js' in el.get('src'):
95+ el.getparent().remove(el)
96+
97+ # make custom footer
7898diff --git a/gadgets/standard_revisions-tests/base.py b/gadgets/standard_revisions-tests/base.py
79- index 848d431..67d00f4 100644
99+ index 848d431..91a0a99 100644
80100--- a/gadgets/standard_revisions-tests/base.py
81101+++ b/gadgets/standard_revisions-tests/base.py
82102@@ -27,7 +27,7 @@ import unittest, time, re
@@ -102,7 +122,7 @@ index 9aa3fc7..13294ec 100755
102122 pywikibot.config2.step = 100
103123 pywikibot.config2.put_throttle = 0
104124diff --git a/index2ddg.py b/index2ddg.py
105- index 9789e56..7a3a3dc 100755
125+ index 9789e56..8962791 100755
106126--- a/index2ddg.py
107127+++ b/index2ddg.py
108128@@ -447,7 +447,7 @@ def process_identifier(out, redirects, root, link, item_ident, item_type,
@@ -115,7 +135,7 @@ index 9789e56..7a3a3dc 100755
115135
116136 build_redirects(redirects, item_ident, item_type)
117137diff --git a/index_transform/browser.py b/index_transform/browser.py
118- index d2e625c..82cb11f 100644
138+ index d2e625c..11375f2 100644
119139--- a/index_transform/browser.py
120140+++ b/index_transform/browser.py
121141@@ -42,7 +42,7 @@ class Index2Browser(IndexTransform):
@@ -149,7 +169,7 @@ index cb6e8cc..a8ac18f 100755
149169 rearrange_archive(root)
150170
151171diff --git a/tests/test_preprocess.py b/tests/test_preprocess.py
152- index e4aa687..d6f143f 100644
172+ index e4aa687..4856f1b 100644
153173--- a/tests/test_preprocess.py
154174+++ b/tests/test_preprocess.py
155175@@ -6,23 +6,23 @@ from lxml import etree
0 commit comments