Skip to content

Instantly share code, notes, and snippets.

@sayansil
Created August 9, 2019 22:17
Show Gist options
  • Save sayansil/d85056b910e5352874de0a7f10b93eda to your computer and use it in GitHub Desktop.
Save sayansil/d85056b910e5352874de0a7f10b93eda to your computer and use it in GitHub Desktop.
import requests
def test_abnormal_char(EMAIL, CODE):
test_url = 'https://finance.yahoo.com/news/why-amd-stock-keep-climbing-160125203.html?.tsrc=rss'
data = {"article": test_url}
headers = {'User-Auth': 'email=' + EMAIL + ';code=' + CODE}
response = requests.post("http://localhost:8080/clean-text", data=data, headers=headers).json()
return response['full_text']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment