intoli / user-agents

A JavaScript library for generating random user agents with data that's updated daily.
Other
955 stars 51 forks source link

Python version #13

Open Yomguithereal opened 4 years ago

Yomguithereal commented 4 years ago

Hello @intoli,

Thanks for the very useful tool. I was wondering if you'd accept to have your library replicated in python (I can do it if you want), as I would very much like to have your user-agents available in a python environment.

Have a great day,

amitupreti commented 4 years ago

@Yomguithereal The BSD 2-Clause License provides freedom to do whatever you want with the user-agent package as long as you include their original license with your python version.

I am also thinking of porting this as a python package. as it will be helpful to a lot of other people who write scrapers in python.

Let's collaborate.

if @intoli wants to start the python version. I would be more than happy to collaborate here.

Yomguithereal commented 4 years ago

@amitupreti I don't have much time right now to draft a port but if you start one I will gladly help you.

amitupreti commented 4 years ago

okay. I will start a repo in few days and ping you.

sangaline commented 4 years ago

This is something that we're definitely interested in and have been semi-planning for a while. In addition to the value of the user agents themselves, we put a fair bit of thought into the API of the library. I've been just fetching the user-agents.json.gz in Python when I need to use the user agents there, and the main slow down on an official Python port has been coming up with a variant of the API that feels natural in Python.

I could imagine having multiple language ports live in the same repository, and have the nightly build process fetch the new data and publish each of them. It might just make more sense to have them be separate repos and download the data file in the non-JS versions. @LeMoussel just asked about a golang port as well.

amitupreti commented 4 years ago

@sangaline It would be easy to get the nightly update of the data if it is initiated by the awesome people at intoli and we can contribute on it.. It would receive more collaborators that way. But i really don't have much idea. I learnt about Intoli today and have been going through all of your stuff and found it really helpful. So wanted to contribute.

What do you think would be a good idea. ports on separate repos? would it be best if it is initiated by Intoli.?

It would make more sense and easy to contribute if there were separate repos for the ports.

LeMoussel commented 4 years ago

@amitupreti As for example

amitupreti commented 4 years ago

@LeMoussel yes this would be awesome. Waiting for it to be initiated by Intoli now.

vesper8 commented 4 years ago

has there been any update to to having a python version of this awesome script? is there a repo WIP somewhere already? @intoli?