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

First welcome post is displayed #1

Open
davein2it opened this issue Sep 9, 2017 · 1 comment
Open

First welcome post is displayed #1

davein2it opened this issue Sep 9, 2017 · 1 comment

Comments

@davein2it
Copy link
Owner

davein2it commented Sep 9, 2017

Would really like the first tweet from a blog to be the learners. There is a default start post added to the blog when it is set up. This means that the feed can feature a whole series of these welcome posts when a class is first established. The ability to identify and by pass these would be great.

@davein2it
Copy link
Owner Author

davein2it commented Feb 6, 2018

Have worked through a solution to this which will be added to the code.
Relies on creating a variable that will hold the string to appear in any welcome posts for the blogs.
If the post is a welcome one no tweet will happen code snippet below

#Setting post to the link for the first entry.  Later check and verify whether
#this link has been promoted already. There will also be a check that the post is not a welcome one
#ie made to check the blog works etc. Welcome posts are not promoted either
    try:
      post = d.entries[0].link
      welcomecheck = d.entries[0].link[-12:]
    except:
      continue

    if post in url_string or welcomecheck == welcome:
        print('No new entries or welcomepost')
    else:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant