Commit ef36523
authored
Fix regex pattern for citedby_url extraction
- Prefix the string literal with an r
- ( m = re.search(r"cites=[\d+,]*", object["citedby_url"])
- This tells Python to treat backslashes literally, preventing them from being interpreted as escape sequence initiators.
- Fix: scholarly/_scholarly.py:312: SyntaxWarning: invalid escape sequence '\d'
m = re.search("cites=[\d+,]*", object["citedby_url"])1 parent ae36174 commit ef36523
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
309 | 309 | | |
310 | 310 | | |
311 | 311 | | |
312 | | - | |
| 312 | + | |
313 | 313 | | |
314 | 314 | | |
315 | 315 | | |
| |||
0 commit comments