-
Notifications
You must be signed in to change notification settings - Fork 13
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
Cleared the zip from faulty AgentNames #10
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ eggs/ | |
.eggs/ | ||
lib/ | ||
lib64/ | ||
.DS_Store | ||
parts/ | ||
sdist/ | ||
var/ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,12 @@ | ||
Random User Agents | ||
================== | ||
|
||
Use this command to install this forked version: | ||
|
||
```bash | ||
pip install -e git+https://github.com/iVictory2004/random_user_agent.git#egg=random_user_agent | ||
``` | ||
|
||
Random User Agents is a python library that provides list of user agents, | ||
from a collection of more than 326,000+ user agents, based on filters. | ||
|
||
|
@@ -38,9 +44,9 @@ Installation | |
------------ | ||
|
||
You can install random_useragent by running the following command: | ||
|
||
pip install random_user_agent | ||
|
||
```bash | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please revert this change. The developers will be installing the package from the PyPI and this command will not install the intended version of the package. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sowy I will, I just wanted ppl to be able to clone my fork. |
||
pip install -e git+https://github.com/iVictory2004/random_user_agent.git#egg=random_user_agent | ||
``` | ||
Or you can download direct from [Github](https://github.com/Luqman-Ud-Din/random_user_agent) and install it manually. | ||
|
||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,9 +14,11 @@ class UserAgent: | |
'popularity': [], | ||
} | ||
|
||
def __init__(self, limit=None, *args, **kwargs): | ||
def __init__(self, all =False, limit=None, *args, **kwargs): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Loading all the user agents can be achieved as follows:
There is no need for the It's better to add an update to the |
||
self.user_agents = [] | ||
|
||
if all: | ||
self.user_agents = self.load_user_agents() | ||
return | ||
for attribute, values in self.ATTRIBUTES_MAP.items(): | ||
setattr(self, attribute, kwargs.get(attribute, [v.lower() for v in values])) | ||
|
||
|
@@ -51,7 +53,6 @@ def load_user_agents(self): | |
with zipfile.ZipFile(file_path) as zipped_user_agents: | ||
with zipped_user_agents.open('user_agents.jl') as user_agents: | ||
for user_agent in user_agents: | ||
|
||
if hasattr(user_agent, 'decode'): | ||
user_agent = user_agent.decode() | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
|
||
setuptools.setup( | ||
name="random_user_agent", | ||
version="1.0.1", | ||
version="1.0.2", | ||
author="Luqman-Ud-Din Muhammad", | ||
author_email="[email protected]", | ||
description="A package to get random user agents based filters provided by user", | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please revert these documentation updates. After the PR merge these changes will become part of the documentation and will misguide the developers.