Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
GONZOsint committed Apr 16, 2019
0 parents commit 11ce9cb
Show file tree
Hide file tree
Showing 15 changed files with 131 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
21 changes: 21 additions & 0 deletions LICENSE
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2019 HATI

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
1 change: 1 addition & 0 deletions README.md
@@ -0,0 +1 @@
# pywhatcms
1 change: 1 addition & 0 deletions build/lib/pywhatcms/__init__.py
@@ -0,0 +1 @@
from .pywhatcms import *
13 changes: 13 additions & 0 deletions build/lib/pywhatcms/pywhatcms.py
@@ -0,0 +1,13 @@
import requests

def whatcms(key, url):
whatcms.r = requests.get('https://whatcms.org/APIEndpoint/Detect?key=' + key + '&url=' + url).json()
whatcms.name = whatcms.r['result']['name']
whatcms.code = whatcms.r['result']['code']
whatcms.confidence = whatcms.r['result']['confidence']
whatcms.cms_url = whatcms.r['result']['cms_url']
whatcms.version = whatcms.r['result']['version']
whatcms.msg = whatcms.r['result']['msg']
whatcms.id = whatcms.r['result']['id']
whatcms.request = whatcms.r['request']
whatcms.request_web = whatcms.r['request_web']
Binary file added dist/pywhatcms-1.0.6-py3-none-any.whl
Binary file not shown.
Binary file added dist/pywhatcms-1.0.6.tar.gz
Binary file not shown.
44 changes: 44 additions & 0 deletions pywhatcms.egg-info/PKG-INFO
@@ -0,0 +1,44 @@
Metadata-Version: 2.1
Name: pywhatcms
Version: 1.0.6
Summary: Unofficial WhatCMS API package
Home-page: https://github.com/HA71/pywhatcms
Author: HATI
Author-email: bisha@protonmail.com
License: UNKNOWN
Description: # PyWhatcms
Python package for whatcms.com API

The package provides a simple way to use the whatcms.org API for detecting 467 different Content Management Systems

## Installation
```
pip install pywhatcms
```

## Usage
First of all, import pywhatcms:
```
from pywhatcms import whatcms
```
Query a domain:
```
whatcms('API-KEY', 'blog.underc0de.org')
```
Obtain info:
```
whatcms.name
whatcms.code
whatcms.confidence
whatcms.cms_url
whatcms.version
whatcms.msg
whatcms.id
whatcms.request
whatcms.request_web
```

Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
9 changes: 9 additions & 0 deletions pywhatcms.egg-info/SOURCES.txt
@@ -0,0 +1,9 @@
README.md
setup.py
pywhatcms/__init__.py
pywhatcms/pywhatcms.py
pywhatcms.egg-info/PKG-INFO
pywhatcms.egg-info/SOURCES.txt
pywhatcms.egg-info/dependency_links.txt
pywhatcms.egg-info/requires.txt
pywhatcms.egg-info/top_level.txt
1 change: 1 addition & 0 deletions pywhatcms.egg-info/dependency_links.txt
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions pywhatcms.egg-info/requires.txt
@@ -0,0 +1 @@
requests
1 change: 1 addition & 0 deletions pywhatcms.egg-info/top_level.txt
@@ -0,0 +1 @@
pywhatcms
1 change: 1 addition & 0 deletions pywhatcms/__init__.py
@@ -0,0 +1 @@
from .pywhatcms import *
13 changes: 13 additions & 0 deletions pywhatcms/pywhatcms.py
@@ -0,0 +1,13 @@
import requests

def whatcms(key, url):
whatcms.r = requests.get('https://whatcms.org/APIEndpoint/Detect?key=' + key + '&url=' + url).json()
whatcms.name = whatcms.r['result']['name']
whatcms.code = whatcms.r['result']['code']
whatcms.confidence = whatcms.r['result']['confidence']
whatcms.cms_url = whatcms.r['result']['cms_url']
whatcms.version = whatcms.r['result']['version']
whatcms.msg = whatcms.r['result']['msg']
whatcms.id = whatcms.r['result']['id']
whatcms.request = whatcms.r['request']
whatcms.request_web = whatcms.r['request_web']
23 changes: 23 additions & 0 deletions setup.py
@@ -0,0 +1,23 @@
import setuptools

with open("README.md", "r") as fh:
long_description = fh.read()

setuptools.setup(
name="pywhatcms",
version="1.0.6",
author="HATI",
author_email="bisha@protonmail.com",
description="Unofficial WhatCMS API package",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/HA71/pywhatcms",
packages=setuptools.find_packages(),
classifiers=[
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
],
install_requires=[
'requests'
]
)

0 comments on commit 11ce9cb

Please sign in to comment.