-
Notifications
You must be signed in to change notification settings - Fork 94
Open
Description
I was using BeautifulSoup to scrape through a Forbes article to pull out the text until I realized Alchemy has an API to do this. I was running into an annoying scenario where the landing page for any forbes article is the forbes/home page with a 'Continue 3..2..1' displayed on the page. I was able to work around that, but it seems that your API doesn't. Can I feed the raw html from BeautifulSoup to an API call on your end? This would be my quickest workaround. I will be reading the API docs but currently this is what happens.
- URL: http://www.forbes.com/sites/laurashin/2015/09/09/bitcoins-shared-ledger-technology-moneys-new-operating-system/
- What I am expecting is the text on the response object to have the article text, but it has the continue text.
from alchemyapi import AlchemyAPI
import json
# Create the AlchemyAPI Object
alchemyapi = AlchemyAPI()
# Create demo url which will be user input later
demo_url = 'http://www.forbes.com/sites/laurashin/2015/09/09/bitcoins-shared-ledger-technology-moneys-new-operating-system/'
# Created response object from input url
response = alchemyapi.text('url', demo_url)
if response['status'] == 'OK':
print('## Response Object ##')
print(json.dumps(response, indent=4))
print('')
print('## Text ##')
print('text: ', response['text'].encode('utf-8'))
print('')
else:
print('Error in text extraction call: ', response['statusInfo'])Metadata
Metadata
Assignees
Labels
No labels