From 97e417a44924f2fdda8b881c946eacc9af4cc0d3 Mon Sep 17 00:00:00 2001 From: Romain Bignon Date: Mon, 17 Sep 2018 19:27:58 +0200 Subject: [PATCH] Revert "Insult overhaul" This reverts commit f65830ba4e8dc46edcf5e895b508f898fa25e969. --- modules/aum/browser.py | 2 +- modules/banquepopulaire/pages.py | 6 ++---- modules/bnpcards/browser.py | 2 +- modules/bnporc/module.py | 2 +- modules/cmso/pro/pages.py | 2 +- modules/dailymotion/test.py | 2 +- modules/hsbc/browser.py | 2 +- modules/ina/test.py | 4 ++-- modules/tumblr/browser.py | 1 - weboob/applications/boobathon/boobathon.py | 2 +- weboob/deprecated/browser/browser.py | 4 ++-- 11 files changed, 13 insertions(+), 16 deletions(-) diff --git a/modules/aum/browser.py b/modules/aum/browser.py index 4e5e9c7a8e..9160f1a9e0 100644 --- a/modules/aum/browser.py +++ b/modules/aum/browser.py @@ -400,7 +400,7 @@ def get_dist(self, lat, lng): @url2id def get_profile(self, id): - # XXX OLD API IS DISABLED (damn soyboys) + # XXX OLD API IS DISABLED #r = self.api0_request('member', 'view', data={'id': id}) #if not 'result' in r: # print r diff --git a/modules/banquepopulaire/pages.py b/modules/banquepopulaire/pages.py index 1c77bda80c..f6b75fa29c 100644 --- a/modules/banquepopulaire/pages.py +++ b/modules/banquepopulaire/pages.py @@ -121,8 +121,6 @@ def is_error(self): def build_token(self, token): """ - These soyboys have introduced a new protection on the token. - Each time there is a call to SAB (selectActionButton), the token available in the form is modified with a key available in JS: @@ -166,7 +164,7 @@ def get_button_actions(self): class MyHTMLPage(BasePage, HTMLPage): def build_doc(self, data, *args, **kwargs): - # XXX CRAPPY HACK BECAUSE BANQUE POPULAIRE ARE SOYBOYS AND INCLUDE NULL + # XXX FUCKING HACK BECAUSE BANQUE POPULAIRE ARE FAGGOTS AND INCLUDE NULL # BYTES IN DOCUMENTS. data = data.replace(b'\x00', b'') return super(MyHTMLPage, self).build_doc(data, *args, **kwargs) @@ -763,7 +761,7 @@ def get_account_history(self): t.label = re.sub('solde en valeur : .*', '', t.label) t.raw = re.sub('solde en valeur : .*', '', t.raw) - # XXX Crappy hack to include the check number not displayed in the full label. + # XXX Fucking hack to include the check number not displayed in the full label. if re.match("^CHEQUE |^CHQ VOTRE CHEQUE", t.label): t.raw = '%s No: %s' % (t.raw, cleaner(tds[self.COL_REF])) diff --git a/modules/bnpcards/browser.py b/modules/bnpcards/browser.py index 658ede37f0..af67848227 100644 --- a/modules/bnpcards/browser.py +++ b/modules/bnpcards/browser.py @@ -130,7 +130,7 @@ def iter_accounts(self): ids[account.id] = account yield account - # Could be the very same as non corporate but this crappy website seems + # Could be the very same as non corporate but this shitty website seems # completely bugged def get_ti_corporate_transactions(self, account): if account.id not in self.transactions_dict: diff --git a/modules/bnporc/module.py b/modules/bnporc/module.py index 3bb4663d40..26046535ce 100644 --- a/modules/bnporc/module.py +++ b/modules/bnporc/module.py @@ -156,7 +156,7 @@ def iter_threads(self, cache=False): threads = self._threads if not cache or threads is None or old: threads = list(self.browser.iter_threads()) - # the website is dumb and does not have the messages in the proper order + # the website is stupid and does not have the messages in the proper order threads = sorted(threads, key=lambda t: t.date, reverse=True) self._threads = threads seen = self.storage.get('seen', default=[]) diff --git a/modules/cmso/pro/pages.py b/modules/cmso/pro/pages.py index 198b60c391..b1ac8629e2 100644 --- a/modules/cmso/pro/pages.py +++ b/modules/cmso/pro/pages.py @@ -262,7 +262,7 @@ class item(CmsoTransactionElement): def date(selector): return DateGuesser(CleanText(selector, children=False), Env('date_guesser')) | Transaction.Date(selector) - # CAUTION: this shitty website writes a 'Date valeur' inside a div with a class == 'c-ope' + # CAUTION: this website write a 'Date valeur' inside a div with a class == 'c-ope' # and a 'Date opération' inside a div with a class == 'c-val' # so actually i assume 'c-val' class is the real operation date and 'c-ope' is value date obj_date = date('./div[contains(@class, "c-val")]') diff --git a/modules/dailymotion/test.py b/modules/dailymotion/test.py index 7acd54bde6..cf2008e803 100644 --- a/modules/dailymotion/test.py +++ b/modules/dailymotion/test.py @@ -39,7 +39,7 @@ def setUp(self): self.backend.config['format'] = Value(value='mp4') def test_search(self): - l = list(itertools.islice(self.backend.search_videos('sarkozy'), 0, 20)) + l = list(itertools.islice(self.backend.search_videos('chirac'), 0, 20)) self.assertTrue(len(l) > 0) v = choice(l) self.backend.fillobj(v, ('url',)) diff --git a/modules/hsbc/browser.py b/modules/hsbc/browser.py index d84ec75a3a..8c7f66a500 100644 --- a/modules/hsbc/browser.py +++ b/modules/hsbc/browser.py @@ -153,7 +153,7 @@ def do_login(self): if self.login.is_here(): self.page.useless_form() - # This garbage website has 2 baseurl with only one difference: the 's' at the end of 'client' + # This shitty website has 2 baseurl with only one difference: the 's' at the end of 'client' new_base_url = 'https://clients.hsbc.fr/' if new_base_url in self.url: self.BASEURL = new_base_url diff --git a/modules/ina/test.py b/modules/ina/test.py index 4dc195f8ef..e04bb2e283 100644 --- a/modules/ina/test.py +++ b/modules/ina/test.py @@ -25,14 +25,14 @@ class INATest(BackendTest): MODULE = 'ina' def test_video_ina(self): - l = list(itertools.islice(self.backend.search_videos('sarkozy'), 0, 20)) + l = list(itertools.islice(self.backend.search_videos('chirac'), 0, 20)) self.assertTrue(len(l) > 0) v_id = l[0].id v = self.backend.get_video(v_id) self.assertTrue(v.url and v.url.startswith('https://'), 'URL for video "%s" not found: %s' % (v.id, v.url)) def test_audio_ina(self): - l = list(itertools.islice(self.backend.search_audio('sarkozy'), 0, 20)) + l = list(itertools.islice(self.backend.search_audio('chirac'), 0, 20)) self.assertTrue(len(l) > 0) a_id = l[0].id a = self.backend.get_audio(a_id) diff --git a/modules/tumblr/browser.py b/modules/tumblr/browser.py index bdcc65d993..5033beb519 100644 --- a/modules/tumblr/browser.py +++ b/modules/tumblr/browser.py @@ -37,7 +37,6 @@ def __init__(self, baseurl, *args, **kwargs): def consent(self): response = self.open(self.BASEURL) html = response.text - # I hope their Macbooks catch fire for making it that painful token = re.search(r'name="tumblr-form-key".*?content="([^"]*)"', html).group(1) data = { diff --git a/weboob/applications/boobathon/boobathon.py b/weboob/applications/boobathon/boobathon.py index 5d3b465167..64c30f8152 100644 --- a/weboob/applications/boobathon/boobathon.py +++ b/weboob/applications/boobathon/boobathon.py @@ -781,7 +781,7 @@ def load_default_backends(self): return if not self.check_loaded_backends({'url': 'https://symlink.me'}): - print("Ok, so leave now, soyboy.") + print("Ok, so leave now.") sys.exit(0) def is_module_loadable(self, module): diff --git a/weboob/deprecated/browser/browser.py b/weboob/deprecated/browser/browser.py index cdf621eb50..4d2fe80beb 100644 --- a/weboob/deprecated/browser/browser.py +++ b/weboob/deprecated/browser/browser.py @@ -597,8 +597,8 @@ def location(self, *args, **kwargs): self.home() self.location(*keep_args, **keep_kwargs) - # DO NOT ENABLE THIS CRAPPY PIECE OF CODE EVEN IF IT WOULD BE BETTER - # TO FUCKING SANITARIZE HTML. + # DO NOT ENABLE THIS FUCKING PEACE OF CODE EVEN IF IT WOULD BE BETTER + # TO SANITARIZE FUCKING HTML. #def _set_response(self, response, *args, **kwargs): # import time # if response and hasattr(response, 'set_data'): -- GitLab