Skip to content

Simple & Easy-to-use search engine to search for pyrogram api methods and raw functions

License

Notifications You must be signed in to change notification settings

Itz-fork/BetterPyroDocs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Better Pyro Docs

Simple & Easy-to-use search engine to search for pyrogram api methods and raw functions

What's in

API

  • Directory: api

  • About: API to search for pyrogram's api methods and raw functions

  • Run with deno:

    deno run --allow-net --allow-env api/main.ts
  • Search for

    • Methods
      [GET] /search/methods/<query>
      
    • Raw functions
      [GET] /search/raw/<query>
      

Bot

  • Directory: bot

  • About: Telegram bot to search for pyrogram's api methods and raw functions using inline mode

  • Run with deno:

    deno run --allow-net --allow-env --allow-run --allow-read --allow-write bot/main.ts
  • Search for

    • Methods
      !m <query>
      
    • Raw functions
      !r <query>
      

Web

Guides

Update cache

Update cached data lives inside cache directory.

deno run --allow-net --allow-write lib/scraper.ts

Update database

Updated mongodb database collections based on local cache

deno run --allow-net --allow-read --allow-env scripts/save_to_db.ts

Create search indexes

You need to create 2 search indexes to make it work. First one for api methods and other one for raw functions

  • Click on "Browse Collections"
  • Navigate to search tab of the mongodb cluster
  • Click on "CREATE INDEX" button
  • Select "JSON Editor" and click on "Next" button
  • Select database collection
    • API_METHODS - for api methods index
    • RAW_FUNCTIONS - for raw functions index
  • Give "Index name"
    • api_methods - for api methods index
    • raw_functions - for raw functions index
  • Copy and paste the following index definition to the json editor
    • For api methods index
    {
        "mappings": {
            "dynamic": false,
            "fields": {
                "name": {
                    "type": "string"
                },
                "description": {
                    "type": "string"
                }
            }
        }
    }
    
    • For raw functions index
    {
        "mappings": {
            "dynamic": false,
            "fields": {
                "class_name": {
                    "type": "string"
                },
                "description": {
                    "type": "string"
                }
            }
        }
    }
    

Why?

The main goal of this project is to improve my web scraping skills, experiment with deno and mongodb atlas full text feature.

License

Licensed under MIT

About

Simple & Easy-to-use search engine to search for pyrogram api methods and raw functions

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published