This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import base64 | |
import rsa | |
import hashlib | |
(pubkey, privkey) = rsa.newkeys(512) | |
with open('private.key','wb') as keyfile: | |
keyfile.write(privkey._save_pkcs1_pem()) | |
with open('public.key','wb') as keyfile: | |
keyfile.write(pubkey._save_pkcs1_pem()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jq --raw-output '.log.entries | .[].request | select(.url|test("^https://instagram.fdel*")) .url' stories.har > highlights.txt | |
while IFS= read -r line; do wget $line; done < highlights.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
from bs4 import BeautifulSoup | |
host = "https://www.blinkist.com" | |
headers = {"User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0"} | |
free_daily = requests.get("https://www.blinkist.com/en/nc/daily", headers=headers) | |
html = BeautifulSoup(free_daily.content, 'html.parser') | |
headline = html.find("h3", class_="daily-book__headline").get_text() | |
author = html.find(class_="daily-book__author") |