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

Add Taipei Times #639

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Add Taipei Times #639

wants to merge 4 commits into from

Conversation

addie9800
Copy link
Collaborator

No description provided.

Copy link
Collaborator

@MaxDall MaxDall left a comment

Choose a reason for hiding this comment

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

Thanks for adding 👍 Our first publisher from Taiwan 🚀

return []
else:
selection = re.sub(r"(?i)(^by\s*|/.*)", "", author_selection[0])
return [author.strip() for author in selection.split(" and ")]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Using generic_author_parsing here would be beneficial because it also handles all the normalization. It is best practice to utilize the generic functions, as they normalize the output.

Edit: Also I think Staff reporter can be safely removed from the output.

Comment on lines 17 to 19
_paragraph_selector = XPath("//div[@class='archives']/p")
_summary_selector = XPath("//div[@class='archives']/h2")
_author_selector = XPath("//div[@class='archives']//div[@class='name']/text()")
Copy link
Collaborator

Choose a reason for hiding this comment

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

By Eddy Chang, Taipei Times/台北時報張聖恩 at the end of this article is extracted as well.

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