Skip to content
This repository has been archived by the owner on Jul 1, 2022. It is now read-only.

Commit

Permalink
Workaround robobrowser bug to support Python 3.7, fix #25
Browse files Browse the repository at this point in the history
  • Loading branch information
voyageur committed Jul 24, 2018
1 parent 2b5e76c commit 2f02fbc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions dagr/dagr.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 2f02fbc

Please sign in to comment.