Skip to content

Commit

Permalink
Fix #1 again
Browse files Browse the repository at this point in the history
- Fix regex (and make it future proof)
  • Loading branch information
daijro authored Mar 28, 2022
1 parent 9f9373a commit 41c98d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def set_initial_information(self):
self.numberDataRsid, self.dataRSID, self.linkPath
"""
try:
linkPath = pot_url = re.findall('url\\(\\/doc-asset\\/bg[\\/a-z0-9\\.\\-]+\\);', self._resp.text)[0][4:-2]
linkPath = pot_url = re.findall(r'\/doc-asset\/bg\/[a-z0-9\.\-]+\/splits\/\d+\/split\-[a-z0-9\.\-]+\.jpg', self._resp.text)[0]
except IndexError as e:
raise self.exceptions.TooManyRequests from e
except Exception as e:
Expand Down

0 comments on commit 41c98d6

Please sign in to comment.