lib/social_parser/provider/twitter.rb in social_parser-1.0.5 vs lib/social_parser/provider/twitter.rb in social_parser-1.0.6
- old
+ new
@@ -2,10 +2,10 @@
module SocialParser
module Provider
class Twitter < Base
URL_FORMATS = {
- full: /\A((https?):\/\/)?(www\.)?twitter\.com\/(?:(?:\w)*#!\/)?(?<id>\w+)/i
+ full: /\A((https?):\/\/)?(www\.)?twitter\.com\/@?(?<id>[\w\-\.]+)/i
# regular: /\Ahttps?:\/\/(www\.)?twitter\.com\/(?!share)(?!share\?)(?!intent\/)(?<id>.+?)\/?\Z/
}
def provider
:twitter