Created
September 26, 2017 19:39
-
-
Save soeffing/0bf791af41d234df46f4afaa213bd8b9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
from pprint import pprint | |
import requests | |
import json | |
CLF_URL = FILL_IN_ENDPOINT (as string) | |
# If you put `debug` to 1, you get a bunch of helpful debug info, e.g. the article that was extracted from the URL | |
# query parameter must be set, otherwise classification will be really off | |
payloads = [ | |
{'urls': ['https://backlinko.com/seo-techniques'], 'query': 'seo techniques', 'debug': 0}, | |
{'urls': ['https://seo-hacker.com/black-hat-seo-hacker/'], 'query': 'black hat seo', 'debug': 0}, | |
] | |
for payload in payloads: | |
r = requests.get(CLF_URL, params=payload) | |
j_r = json.loads(r.text) | |
pprint(j_r) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment