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

make pypi html parser regex less greedy #77

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jbouzekri
Copy link

This makes the regex to find the download link of a python package less greedy.

Before, on this string :

<a href="https://files.pythonhosted.org/packages/ba/bb/dfa0141a32d773c47e4dede1a617c59a23b74dd302e449cf85413fc96bc4/requests-0.2.0.tar.gz#sha256=813202ace4d9301a3c00740c700e012fb9f3f8c73ddcfe02ab558a8df6f175fd">requests-0.2.0.tar.gz</a><br/>
<a href="https://files.pythonhosted.org/packages/4b/ad/d536b2e572e843fda13e4458c67f937b05ce359722c1e4cdad35ba05b6e3/requests-0.2.1.tar.gz#sha256=d54eb33499f018fc6bd297613bf866f8d134629c8e02964aab6ef951f460e41e">requests-0.2.1.tar.gz</a><br/>

for the package requests-0.2.1.tar.gz it would have matched the download link of package requests-0.2.0.tar.gz which is not intended behavior (in fact it always download the first link found in the 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.

1 participant