GithubHelp home page GithubHelp logo

igbloks's Introduction

๐Ÿ“ 20, FRA, OSINT Research & Investigations, Malfrats Ind.

  • Discord -> aet (or aet#5349) (i got banned, fuck it, go twitter)
  • My twitter
  • My blog

igbloks's People

Contributors

novitae avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

igbloks's Issues

example code error

from igbloks.html import bloks_to_html
import json
from bs4 import BeautifulSoup
file_path = r"C:\Users\Administrator\Downloads\igbloks-main\blocks.json"
with open(file_path, "r") as read:
tree = json.load(read)["layout"]["bloks_payload"]["tree"]
htmled = bloks_to_html(tree)
soup = BeautifulSoup()
dj = soup.find("bk.components.text", {"text": "Date joined"})
dj.parent.find_all("bk.components.text")[-1]["text"]

error
Traceback (most recent call last):
File "c:\Users\Administrator\Downloads\igbloks-main\test.py", line 6, in
tree = json.load(read)["layout"]["bloks_payload"]["tree"]
^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\json_init_.py", line 293, in load
return loads(fp.read(),
^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\json_init_.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

how to fix it ?

Detection of identical bkid keys

Some bkid are different but their key mapping is the same than others. As an example, iOS ones and Android ones are charging at each versions, but their keys are always the same (those silly Chinese chars).

  • Making an updatable json that contains all the bkid available, and linking them between each others.
    When the to_python function will be called with a bkid, we will see if it is a "root" one, otherwise we will look for its "root" identical one to call. This will avoid retyping countless times the same fields aliases for same objects.

Recursive search

Implementing the recursive search of elements in the tree

  • Findall method
  • Find method
  • Filters

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.