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

Add minimal usage example #1

Closed
GiulioRossetti opened this issue Jan 26, 2021 · 5 comments
Closed

Add minimal usage example #1

GiulioRossetti opened this issue Jan 26, 2021 · 5 comments

Comments

@GiulioRossetti
Copy link

Hi,
I'm new to Rust, could you please provide a minimal guide on how to use the script from a terminal?
I managed to install rust and build the project (I guess) but it seems I'm not able to run it.

My commands were:

cargo build
cargo run /examples/echo--parent-no-comment.html

Am I missing something?

Thanks in advance,
Giulio

@tarqd
Copy link
Owner

tarqd commented Jan 27, 2021

Hey Giulio,

Currently, it just takes input via stdin:

cargo run < examples/echo--parent-no-comment.html

I will add an example to readme as well. Thank you

@tarqd tarqd closed this as completed in afff042 Jan 27, 2021
@tarqd
Copy link
Owner

tarqd commented Jan 27, 2021

Tip: Because of this you should be able to pipe copies of parler pages right from google cache:

curl 'https://webcache.googleusercontent.com/search?q=cache:2uZKopUDxnMJ:https://parler.com/post/aa357f2e78504382825f0bd119ce8728+&cd=2&hl=en&ct=clnk&gl=us' \
  -H 'authority: webcache.googleusercontent.com' \
  -H 'cache-control: max-age=0' \
  -H 'upgrade-insecure-requests: 1' \
  -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36' \
  -H 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9' \
  -H 'x-client-data: CJa2yQEIo7bJAQjEtskBCKmdygEIx8LKAQisx8oBCPjHygEIpM3KAQijz8oBCNzVygEI7ZjLAQiLmcsBCJOaywEIi5zLAQipncsBCKudywEY+bjKAQ==' \
  -H 'sec-fetch-site: none' \
  -H 'sec-fetch-mode: navigate' \
  -H 'sec-fetch-user: ?1' \
  -H 'sec-fetch-dest: document' \
  -H 'accept-language: en-US,en;q=0.9' \
  --compressed | cargo run

@GiulioRossetti
Copy link
Author

That's really nice thanks!

Just a question, do you know where to find a list of post ids to query the Google cache?

I've been able to find torrent containing a partial dump of Parler pages but it is quite limited.

@tarqd
Copy link
Owner

tarqd commented Jan 27, 2021

CommonCrawl and Wayback Machine API should get you started

@GiulioRossetti
Copy link
Author

Thank's again.
That's something that still I don't get though: I receive as a response always the same page, disregarding the post id I specify in the search string. What am I doing wrong?

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

2 participants