Beispiel #1
0
    def __init__(self, api, Id=None, URL=None):
        if Id and not URL:
            URL = reviewer_url(Id)
        elif URL and not Id:
            Id = extract_reviewer_id(URL)

        if not Id and not URL:
            raise ValueError('Must provide either an Id or a URL')

        if 'cdp/member-reviews' not in URL:
            raise ValueError('We cannot parse reviews that are not on a users "cdp/member-reviews" page')

        self.api = api
        self._id = Id
        self._url = URL
        self._soup = None
Beispiel #2
0
    def __init__(self, api, Id=None, URL=None):
        if Id and not URL:
            URL = reviewer_url(Id)
        elif URL and not Id:
            Id = extract_reviewer_id(URL)

        if not Id and not URL:
            raise ValueError("Must provide either an Id or a URL")

        if "cdp/member-reviews" not in URL:
            raise ValueError('We cannot parse reviews that are not on a users "cdp/member-reviews" page')

        self.api = api
        self._id = Id
        self._url = URL
        self._soup = None
Beispiel #3
0
 def user_id(self):
     url = self.user_reviews_url
     if url:
         return extract_reviewer_id(url)
 def author_id(self):
     return extract_reviewer_id(self._reviewer.url)
 def id(self):
     return extract_reviewer_id(self.url)
Beispiel #6
0
 def user_id(self):
     return extract_reviewer_id(self.user_reviews_url)
Beispiel #7
0
 def author_id(self):
     return extract_reviewer_id(self._reviewer.url)
Beispiel #8
0
 def id(self):
     return extract_reviewer_id(self.url)
Beispiel #9
0
 def user_id(self):
     return extract_reviewer_id(self.user_reviews_url)