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

[Bounty] Headless browser for fetching Proof Post #40

Open
5 tasks done
hominluo opened this issue Oct 29, 2022 · 12 comments
Open
5 tasks done

[Bounty] Headless browser for fetching Proof Post #40

hominluo opened this issue Oct 29, 2022 · 12 comments

Comments

@hominluo
Copy link
Member

Catalogue

  • Platform
    • Gitcoin
  • Experience
    • Intermediate
  • Category
    • Next.ID ProofService
  • Time Commitment
    • 2 weeks
  • Bounty Size
    • $3000

tl;dr: add a headless browser mechanism alongside current API-based proof post fetching channel.

Bounty Description

For now, proof_server performs proof_post fetching by API or single HTTP GET. But in real world, there may be no way for some platforms to do this way. Including:

  • No APIs at all provided by platform
  • API needs each user to do an OAuth to fetch their own data
  • API has very strict quota and will finally exceed if proof_service users grows.
  • User data cannot be fetched by single HTTP GET (e.g. JavaScript-driven XHR is performed in that page)
  • HTML DOM struct is changed frequently, can't define a fixed selector to query the data from DOM tree.
  • Remote HTTP server has a strict anti-bot mechanism, single HTTP GET will be blocked in a short amount of time.

To make proof_server supports more and more services later, we need a headless browser to simulate normal user's page-browsing flow.

Design goal

  • The headless browser module can be kind of independent from current proof_server's code structure. With a simple wrapper, proof_server can communicate with it in different processes.
  • The headless browser module will find user's proof post using single regexp, instead of parsing and css-style selecting DOM.

Winner Info

We will select up to 2 winners and each will receive at least $3000 as the winning prize.

Submission Info

Please make sure you read through our docs before starting your hacking. You will need to create a pr to this repo to submit your work.

Contact Info

@hominluo @nykma here or Telegram for any question regarding how to work on Next.ID.

@gitcoinbot
Copy link

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This issue now has a funding of 1452.5352 MASK attached to it as part of the nextdotid fund.

@unJokers
Copy link

unJokers commented Nov 5, 2022

cool

@lyledavids
Copy link

Hi @hominluo @nykma

Is it possible to integrate this with Puppeteer?
What repo must the PR be in?

@nykma
Copy link
Member

nykma commented Nov 8, 2022

You can make this as an independent module alongside "proof_service" . If you want to involve in, create a repo under your namespace first.

@lyledavids
Copy link

@nykma Do I just have to show the json response?

@nykma
Copy link
Member

nykma commented Nov 9, 2022

How to design the response API structure is up to you. Just to make sure proof_service side can get the proof post content posted by user.

@lyledavids
Copy link

Going to keep the same response structure. Just want to know if that is all that must be returned?

@lyledavids
Copy link

only json

@lyledavids
Copy link

@nykma for https://proof-service.next.id/v1/proof endpoint
Always getting screen - mismatch message

Is this normal?

@tommy-a
Copy link

tommy-a commented Nov 9, 2022

Hi @hominluo @nykma

Just stumbled upon this bounty and started working on it a few days ago; I'm close to finishing but don't think I'll make it in time for the submission deadline, would it be possible to submit it tomorrow, or is this a hard cutoff?

Thanks!

@lyledavids
Copy link

@tommy-a there was a hackathon extension for a extra day

@synycboom
Copy link
Contributor

Hi @hominluo

I'm not sure whether or not you guys have selected the winners. Could you tell me the estimated announcement date?

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

No branches or pull requests

7 participants