Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite Existing Parser #179

Closed
dennyabrain opened this issue Oct 5, 2022 · 3 comments
Closed

Rewrite Existing Parser #179

dennyabrain opened this issue Oct 5, 2022 · 3 comments

Comments

@dennyabrain
Copy link
Contributor

We have a parser that goes through DOM data and extracts structured content out of it. twee_text, author, timestamp etc.
It can be seen here - https://github.com/tattle-made/OGBV/blob/main/browser-extension/plugin/src/twitter/parser.js

The current way to specify path for different components is very unwieldy and hard to debug 👍🏽

const TWEET_PATH_CLICKED = new RegExp(
        'DIV\\(0\\):DIV\\(0\\):DIV\\(0\\):DIV\\(0\\):ARTICLE\\(0\\):DIV\\(0\\):DIV\\(2\\):DIV\\(1\\):DIV\\(0\\):DIV\\(0\\):DIV\\(0\\):DIV\\(0\\):SPAN'
    );

Lets come up with a cleaner implementation for this and add tests.

@tarunima
Copy link
Collaborator

@dennyabrain can we close this?

@dennyabrain
Copy link
Contributor Author

@Bhargav-Dave i am closing this since its out of scope for now..lets reopen or reference this when we work on fixing the hyperlink issue on twitter.

@Bhargav-Dave
Copy link
Contributor

Noted, that makes sense, we can create the relevant issues with pointed information about problems with the new parser

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants