<commit_before>from intelmq.lib.bot import Bot, sys
from intelmq.bots.collectors.url.lib import fetch_url

class URLCollectorBot(Bot):

    def process(self):
        self.logger.info("Downloading report from %s" % self.parameters.url)
        report = fetch_url(self.parameters.url, timeout = 60.0, chunk_size = 16384)
        self.logger.info("Report downloaded.")
        self.send_message(report)


if __name__ == "__main__":
    bot = URLCollectorBot(sys.argv[1])
    bot.start()
<commit_msg>pass on proxy params to fetch_url<commit_after>from intelmq.lib.bot import Bot, sys
from intelmq.bots.collectors.url.lib import fetch_url

class URLCollectorBot(Bot):

    def process(self):
        self.logger.info("Downloading report from %s" % self.parameters.url)
        report = fetch_url(self.parameters.url, timeout = 60.0, chunk_size = 16384, self.parameters.http_proxy, self.parameters.https_proxy)
        self.logger.info("Report downloaded.")
        self.send_message(report)


if __name__ == "__main__":
    bot = URLCollectorBot(sys.argv[1])
    bot.start()

{'fraction_non_alphanumeric': 0.11444141689373297, 'fraction_numerical': 0.01634877384196185, 'mean_word_length': 3.338582677165354, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1873044', 'n_tokens_mistral': 374, 'n_tokens_neox': 342, 'n_words': 73}