Romain Bignon
Builds for 1 pipeline failed in 2 minutes 25 seconds

Revert "Insult overhaul"

This reverts commit f65830ba.
......@@ -400,7 +400,7 @@ class AuMBrowser(Browser):
@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
......
......@@ -121,8 +121,6 @@ class BasePage(object):
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 @@ class BasePage(object):
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 @@ class TransactionsPage(LoggedPage, MyHTMLPage):
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]))
......
......@@ -130,7 +130,7 @@ class BnpcartesentrepriseBrowser(LoginBrowser):
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:
......
......@@ -156,7 +156,7 @@ class BNPorcModule(Module, CapBankWealth, CapBankTransferAddRecipient, CapMessag
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=[])
......
......@@ -262,7 +262,7 @@ class HistoryPage(CMSOPage):
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")]')
......
......@@ -39,7 +39,7 @@ class DailymotionTest(BackendTest):
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',))
......
......@@ -153,7 +153,7 @@ class HSBC(LoginBrowser):
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
......
......@@ -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)
......
......@@ -37,7 +37,6 @@ class TumblrBrowser(APIBrowser):
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 = {
......
......@@ -781,7 +781,7 @@ class Boobathon(ReplApplication):
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):
......
......@@ -597,8 +597,8 @@ class Browser(StandardBrowser):
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'):
......