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

Importing rss and posts from blogs #89

Closed
wants to merge 1 commit into from

Conversation

alemela
Copy link
Contributor

@alemela alemela commented Jun 5, 2014

main_rss.py: changed bitly conversion with a hash one, added the possibility to save rss.xml, added an url regexp matching step.

rssFetch.js: read blogs url, check if valid and pass them to main_rss.py

@@ -114,6 +106,9 @@ def _savepost(link, pathname):

def process_site(site):
""" Process the feeds of a site """
is_site = re.compile("^([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you explain me the rationale of this regexp?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Divide it mentally in three groups with brackets. First group check domains >= level 2. Second group check first level domain. Third group check the local path. Lastly an optional slash.

In this way the string to pass must be a little structured.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think here can use the analogous for Python (urlparse.urlsplit, IIRC)

@alemela alemela closed this Jun 12, 2014
@alemela alemela deleted the devel_20140529c branch June 12, 2014 16:28
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