diff --git a/src/protego.py b/src/protego.py
index f859e0c..205e5d5 100644
--- a/src/protego.py
+++ b/src/protego.py
@@ -299,6 +299,8 @@ class Protego(object):
     @classmethod
     def parse(cls, content):
         o = cls()
+        if not isinstance(content, str):
+            raise ValueError(f"Protego.parse expects str, got {type(content).__name__}")
         o._parse_robotstxt(content)
         return o
 

diff --git a/tests/test_protego.py b/tests/test_protego.py
index 97ffdfe..6389b02 100644
--- a/tests/test_protego.py
+++ b/tests/test_protego.py
@@ -1059,3 +1059,10 @@ class TestProtego(TestCase):
         rp = Protego.parse(content)
         self.assertFalse(rp.can_fetch("http://example.com/", "FooBot"))
         self.assertFalse(rp.can_fetch("http://example.com", "FooBot"))
+
+    def test_bytestrings(self):
+        content = b"User-Agent: FootBot\nDisallow: /something"
+        with self.assertRaises(ValueError) as context:
+            Protego.parse(content=content)
+
+        self.assertEqual("Protego.parse expects str, got bytes", str(context.exception))

Accept robots.txt as bytes
```python
>>> robots_txt = b"User-Agent: *\nDisallow: /\n"
>>> robots_txt_parser = Protego.parse(robots_txt)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/adrian/temporal/venv/lib/python3.9/site-packages/protego.py", line 310, in parse
    o._parse_robotstxt(content)
  File "/home/adrian/temporal/venv/lib/python3.9/site-packages/protego.py", line 327, in _parse_robotstxt
    hash_pos = line.find('#')
TypeError: argument should be integer or bytes-like object, not 'str'
>>> robots_txt = "User-Agent: *\nDisallow: /\n"
>>> robots_txt_parser = Protego.parse(robots_txt)
>>>
```
tests/test_protego.py::TestProtego::test_bytestrings
tests/test_protego.py::TestProtego::test_1994rfc_example tests/test_protego.py::TestProtego::test_1996rfc_examples tests/test_protego.py::TestProtego::test_allowed tests/test_protego.py::TestProtego::test_allowed_wildcards tests/test_protego.py::TestProtego::test_comments tests/test_protego.py::TestProtego::test_crawl_delay tests/test_protego.py::TestProtego::test_default_user_agent tests/test_protego.py::TestProtego::test_directive_case_insensitivity tests/test_protego.py::TestProtego::test_disallow_target_url_path_is_missing tests/test_protego.py::TestProtego::test_empty_disallow_allow_directives tests/test_protego.py::TestProtego::test_empty_record_group tests/test_protego.py::TestProtego::test_empty_response tests/test_protego.py::TestProtego::test_escaped_special_symbols tests/test_protego.py::TestProtego::test_escaped_url tests/test_protego.py::TestProtego::test_generosity tests/test_protego.py::TestProtego::test_grouping_unknown_keys tests/test_protego.py::TestProtego::test_implicit_allow tests/test_protego.py::TestProtego::test_index_html_is_directory tests/test_protego.py::TestProtego::test_length_based_precedence tests/test_protego.py::TestProtego::test_line_endings tests/test_protego.py::TestProtego::test_malformed_crawl_delay tests/test_protego.py::TestProtego::test_malformed_disallow tests/test_protego.py::TestProtego::test_no_crawl_delay tests/test_protego.py::TestProtego::test_no_leading_user_agent tests/test_protego.py::TestProtego::test_no_preferred_host tests/test_protego.py::TestProtego::test_no_request_rate tests/test_protego.py::TestProtego::test_no_sitemaps tests/test_protego.py::TestProtego::test_nonterminal_dollar tests/test_protego.py::TestProtego::test_percentage_encoding tests/test_protego.py::TestProtego::test_request_rate tests/test_protego.py::TestProtego::test_sitemaps tests/test_protego.py::TestProtego::test_sitemaps_come_first tests/test_protego.py::TestProtego::test_skip_malformed_line tests/test_protego.py::TestProtego::test_skip_unknown_directives tests/test_protego.py::TestProtego::test_special_symbols_dual_behaviour tests/test_protego.py::TestProtego::test_unescaped_url tests/test_protego.py::TestProtego::test_unicode_url_and_useragent tests/test_protego.py::TestProtego::test_url_case_sensitivity tests/test_protego.py::TestProtego::test_url_parts tests/test_protego.py::TestProtego::test_user_agent_case_insensitivity tests/test_protego.py::TestProtego::test_user_agent_grouping tests/test_protego.py::TestProtego::test_with_absolute_urls