Skip to content
Snippets Groups Projects
Verified Commit 3bb12649 authored by Antoine R. Dumont's avatar Antoine R. Dumont
Browse files

pypi.lister: Shuffle the package list

parent 86cfac92
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,7 @@
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
import random
import xmltodict
from .models import PyPiModel
......@@ -41,8 +42,9 @@ class PyPiLister(ListerOnePageApiTransport, SimpleLister):
"""
result = xmltodict.parse(response.content)
_all = result['html']['body']['a']
return [package['#text'] for package in _all]
_packages = [p['#text'] for p in result['html']['body']['a']]
random.shuffle(_packages)
return _packages
def _compute_urls(self, repo_name):
"""Returns a tuple (project_url, project_metadata_url)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment