Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed the syntax warnings that arise when executing the script. #4

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Meisteri-4
Copy link

This fix also seems to improve pattern matching performance.

This fixes the syntax warnings when executing download.py. Basically re.findall() expects a literal backslash followed by a character, this commit makes those backslashes literal.
@xChAmeLIoNz
Copy link

Or better yet, use a raw string literal.

match_siteinfo = re.findall(r'window\.siteInfo\s*=\s*({[^}]+})', main_page)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants