user-agents icon indicating copy to clipboard operation
user-agents copied to clipboard

Python version

Open Yomguithereal opened this issue 5 years ago • 8 comments

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,

Yomguithereal avatar Oct 03 '19 13:10 Yomguithereal

@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.

superryeti avatar Dec 13 '19 11:12 superryeti

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

Yomguithereal avatar Dec 13 '19 12:12 Yomguithereal

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

superryeti avatar Dec 13 '19 12:12 superryeti

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.

sangaline avatar Dec 13 '19 13:12 sangaline

@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.

superryeti avatar Dec 13 '19 14:12 superryeti

@amitupreti As for example

  • intoli/user-agents-python
  • intoli/user-agents-golang

LeMoussel avatar Dec 13 '19 16:12 LeMoussel

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

superryeti avatar Dec 14 '19 01:12 superryeti

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

vesper8 avatar May 17 '20 13:05 vesper8