-
-
Notifications
You must be signed in to change notification settings - Fork 451
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
Improvement Coomer #2214
base: master
Are you sure you want to change the base?
Improvement Coomer #2214
Conversation
The convention is to have |
scrapers/Coomer/Coomer.py
Outdated
@@ -14,6 +14,12 @@ | |||
'Referer': 'https://coomer.su/search_hash' | |||
} | |||
|
|||
def extract_mentions_and_tags(text): | |||
mentions = re.findall(r'@([\w\-.]+)', text) if text else [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
scrapers/Coomer/Coomer.py
Outdated
@@ -14,6 +14,12 @@ | |||
'Referer': 'https://coomer.su/search_hash' | |||
} | |||
|
|||
def extract_mentions_and_tags(text): | |||
mentions = re.findall(r'@([\w\-.]+)', text) if text else [] | |||
hashtags = re.findall(r'#([\w\-.]+)', text) if text else [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
similar with hashtags, you might want to keep scanning until you hit another #
or word boundary
scrapers/Coomer/Coomer.py
Outdated
|
||
out = { | ||
"Title": post['title'], | ||
"Date": post['published'][:10], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be better to instead split on T of ISO8601 or a more robust parsing
Added performers from description starting with @ and tags starting with # if no tags are found in the post. Also fixed issue with extracting special characters from my last pull.