fero (fēro), Sebuah side-project untuk tugas di per-kuliah-an. Fero -> Steel -> Steal -> Scraping got it?.
- Mengambil pranala (URL) dari sebuah portal atau mesin pencari
- banyak.
- Dependencies.
flask
flask-bootstrap
beautifulsoup4
- Quick Run
git clone https://github.com/zeroload/fero
cd fero
FLASK_APP=fero flask run
- Scrapper
POST
,/api/scrapper/<plugin_name>/fetch
,keyword=<keyword>
, should be GETGET
, ???
- Auth / ETA SOON (TM)
It's a bit hacky and sketchy, but it works. How? long story short,
- create a new directory
plugins/
and a shiny new__init__.py
. load(app)
this function will be called upon App initialization. could be useful forfetch(keyword)
returns adict
array containstitle
andurl
, accept a single string askeyword
.- multiple keywords handled by calling
fetch(keyword)
multiple times.
[
{"title": "string", "url": "valid-url"},
{"title": "string", "url": "valid-url"}
]
The plugin directory structure should be like this,
.
├── fero
│ ├── ...
│ ├── plugins
│ │ ├── googlesearch
│ │ │ ├── assets
│ │ │ │ └── ...
│ │ │ └── __init__.py
...
- Unit Test or something (YEP WE NEED THIS ;D)
- Walk around for google search bot kicker :/
- A pagination handler or something in plugins
- Google,
start
parameter - Yahoo,
b
parameter - Liputan6, lazy-load or something
- Google,
- A working UI for the greater good
- Me
- Myself
- I