diff --git a/CHANGELOG.md b/CHANGELOG.md index 62aa7ba..3eb3dcd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ #### TBD - Update to new base URL, fix #24 - Repair and rewrite group crawling +- Workaround robobrowser bug for Python 3.7, fix #25 ## [0.63] (https://github.com/voyageur/dagr/tree/0.63) #### 02/01/2018 diff --git a/dagr/dagr.py b/dagr/dagr.py index ff13652..85051c6 100755 --- a/dagr/dagr.py +++ b/dagr/dagr.py @@ -117,6 +117,9 @@ def set_browser(self): parser = "lxml" except ImportError: parser = "html.parser" + # Workaround robobrowser bug https://github.com/jmcarp/robobrowser/issues/87 + if sys.version_info>=(3,5): + re._pattern_type = re.Pattern self.browser = RoboBrowser(history=False, session=session, tries=3, user_agent=choice(user_agents),