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

The bot is missing interactives and live blog content #7

Open
harrisj opened this issue Sep 28, 2020 · 2 comments
Open

The bot is missing interactives and live blog content #7

harrisj opened this issue Sep 28, 2020 · 2 comments

Comments

@harrisj
Copy link

harrisj commented Sep 28, 2020

Hey there. I used some of the code in my NYT Haiku bot and I've noticed you'll need a few tweaks to get more content.

For interactives, you need to make two changes

The regexp: '^https?://www.nytimes.com/(interactive/)?202'
The p_tags finder should look like p_tags = list(soup.find("article", {"id": "interactive"}).find_all('p'))

For live blog posts, you need to run through each post and each tag in it

p_tags = []
for post in list(soup.find_all("div", {"class": "live-blog-post"})):
    p_tags += post.find_all('p')
@MaxBittker
Copy link
Owner

thanks jacob :)

in your opinion, do you think spiritually, it makes sense to put the live blog content on the bot ? i'm already not sure if I should have crosswords

@harrisj
Copy link
Author

harrisj commented Mar 5, 2021 via email

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

No branches or pull requests

2 participants