Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
retribute.me
api
Commits
7fe92c09
Verified
Commit
7fe92c09
authored
Jun 09, 2019
by
Eliot Berriot
Browse files
Added support for Etsy shops
parent
6f00efa3
Changes
2
Hide whitespace changes
Inline
Side-by-side
retribute_api/providers.py
View file @
7fe92c09
...
...
@@ -112,6 +112,15 @@ class OpenCollective(BasicUsernameInPathProvider):
domain_regex
=
r
"^(\w+\.)*opencollective\.com"
@
registry
.
register
class
Etsy
(
BasicUsernameInPathProvider
):
id
=
"etsy"
label
=
"Etsy"
url
=
"https://etsy.com"
domain_regex
=
r
"^(\w+\.)*etsy\.com"
username_regex
=
r
"^\/[a-zA-Z-_]+/shop/([\w\.]+)/?$"
@
registry
.
register
class
BandCamp
(
BasicUsernameInDomainProvider
):
id
=
"bandcamp"
...
...
tests/search/test_means.py
View file @
7fe92c09
...
...
@@ -13,6 +13,10 @@ from retribute_api.search import means
(
"https://paypal.me/username"
,
{
"provider"
:
"paypal"
,
"id"
:
"username"
}),
(
"https://www.paypal.me/username"
,
{
"provider"
:
"paypal"
,
"id"
:
"username"
}),
(
"https://fr.tipeee.com/username"
,
{
"provider"
:
"tipeee"
,
"id"
:
"username"
}),
(
"https://www.etsy.com/fr_CA/shop/xxPETRICHORxx"
,
{
"provider"
:
"etsy"
,
"id"
:
"xxPETRICHORxx"
},
),
(
"https://tipeee.com/username"
,
{
"provider"
:
"tipeee"
,
"id"
:
"username"
}),
(
"https://custom.com/username?retribute"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment