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

NY Times doesn't work #229

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from
Open

NY Times doesn't work #229

wants to merge 8 commits into from

Conversation

abhigenie92
Copy link

from goose import Goose
extractor = Goose()
article = extractor.extract(url='http://www.nytimes.com/2015/05/19/health/study-finds-dense-breast-tissue-isnt-always-a-high-cancer-risk.html?src=me&ref=general')
text = article.cleaned_text

@MaxwellRebo
Copy link

NYT does a ton of redirecting, it's incredibly annoying. The strategy is to set the user agent to look like a browser and then continue from there (learned from a colleague at Factr). If it doesn't like the user agent, it will sometimes put you in an infinite redirect loop. It partially has to do with their paywall.

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

Successfully merging this pull request may close these issues.

2 participants