Skip to main content

search engines use scraping!

Project description

kmy_scrap

apikey search enggine scraping based!

support python version 3.9.x

like this site!

# download from pip
pip install kmy-scrap

https://pypi.org/project/kmy-scrap/

Example

#import package
import kmy_scrap

search_app_mod = kmy_scrap.Search_App_Mod(query='free fire')
search_rexdl = search_app_mod.rexdl(1)
search_happymod = search_app_mod.happymod()

github = kmy_scrap.Github(query='networking')
search_github = github.search(page=2)# it's looking for 1 page 
# https://github.com/search?q=networking&page=2
searches_github = github.searches(page=2) # it searches pages starting from 1 to stop at the specified page
# https://github.com/search?q=networking&page=1 and https://github.com/search?q=networking&page=2

the result is still in string form, we need to import json to convert the result in json form

#load results
from json import loads

display the result in json form

# Search app mod result
print(loads(search_rexdl))
print(loads(search_happymod))

results ➡️ rexdl ➡️ happymod

#Github search results
print(loads(search_github))
print(loads(searches_github))

results ➡️ search_github ➡️ searches_github


# kmy_scrap
'''
random_user_agent -> (function)

list_category_OceanOfGame -> (function)

Github -> (class)
    |-> __init__(self,query:str) -> str:
    |-> total_results -> (@property)
    |-> search -> (method)
    |-> searches -> (method)

Google -> (class)
    |-> __init__(self,query:str) -> str:
    |-> get_content -> (method)
    |-> search_image -> (method)
    |-> search_query -> (method)
    |-> search_video -> (method)
    
Search_App_Mod -> (class)
    |-> __init__(self,query:str) -> str:
    |-> happymod -> (method)
    |-> rexdl -> (method)
    |-> ocean_of_game -> (method)

SourceForge -> (class)
    |-> __init__(self,query:str) -> str:
    |-> search -> (method)
'''
from kmy_scrap import *
# Parameters
Github(query:str).search(page:int)
Github(query:str).searches(page:int)

Google(query:str).get_content(url:str)
Google(query:str).search_video(max_search:int)
Google(query:str).search_image
    (
      start:int,
      related_results:bool,
      # filter result
      orientation:str, # value : portrait,landscape,square
      anim:str, # value : yes / no
      face:str, # value : yes / no
      size:str, # value : small,medium,large,wallpaper
      color:str, # value : red,orange,yellow,green,teal,purple,pink,brown,gray,white,black
      hl:str, # language
      cr:str, # country
                      )
Google(query:str).search_query
    (
      start:int, # start search
      stop:int, # end search
      lang:str, # language
      country:str, # country
                          )
                                                    
Search_App_Mod(query:str).happymod(search_mode='fast') # mode option 'fast' or 'slow'
Search_App_Mod(query:str).rexdl(page:int)
Search_App_Mod(query:str).ocean_of_game
    (
      type:str, # value : category / search
      page:int,
             )

Update

  • 17-01-2022

add the ocean_of_game method to the Search_App_Mod class, a new SourceForge class with the search method to search.

  • 29-04-2022

added search mode to happymod

results slow, fast

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kmy-scrap-0.1.0.tar.gz (8.9 kB view details)

Uploaded Source

File details

Details for the file kmy-scrap-0.1.0.tar.gz.

File metadata

  • Download URL: kmy-scrap-0.1.0.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.1

File hashes

Hashes for kmy-scrap-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a3fbde3fadd064d6e4c20fb5c042b6ac48384be30e0495267b3b98f6024bae00
MD5 ee14d9ddd05dbbc2251edfa98e0327a5
BLAKE2b-256 5ad308a98852e9d550b9d053a5eb51aed64bbbdd5f68f6f6d7b7b002aa20f5fc

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page