Closed adriannborella closed 4 years ago
Describe the bug A clear and concise description of what the bug is.
when i use the option -k, i obtaint the message "Cookies error, unable to find access_token, proper cookies required"
I fix the error in the archive /udemy/_extract.py
i create the function
def jsonname(self, json): for entry in json: if 'access_token' == entry['name']: return entry['value']
and i modified the function _extract_cookie_string
def _extract_cookie_string(self, raw_cookies): cookies = {} try: tmp = json.loads(raw_cookies)
# access_token = re.search(r'(?i)(?:access_token=(?P<access_token>\w+))', raw_cookies) access_token = self.jsonname(tmp) except: sys.stdout.write(fc + sd + "[" + fr + sb + "-" + fc + sd + "] : " + fr + sb + "Cookies error, Request Headers is required.\n") sys.stdout.write(fc + sd + "[" + fm + sb + "i" + fc + sd + "] : " + fg + sb + "Copy Request Headers for single request to a file, while you are logged in.\n") sys.exit(0) if not access_token: sys.stdout.write(fc + sd + "[" + fr + sb + "-" + fc + sd + "] : " + fr + sb + "Cookies error, unable to find access_token, proper cookies required.\n") sys.stdout.flush() sys.exit(0) #access_token = access_token.group('access_token') cookies.update({'access_token': access_token}) #'client_id': client_id.group('client_id'), return cookies
i wan to do a push request and a do have an error. For these reason i generate a issue
Thanks
@adriannborella this is not a bug, but issue on your side giving the cookies or access token. closing the issue as invalid and won't accept PR for this, good to know you that your way works for you.
Describe the bug A clear and concise description of what the bug is.
when i use the option -k, i obtaint the message "Cookies error, unable to find access_token, proper cookies required"
I fix the error in the archive /udemy/_extract.py
i create the function
def jsonname(self, json):
for entry in json: if 'access_token' == entry['name']: return entry['value']
and i modified the function _extract_cookie_string
def _extract_cookie_string(self, raw_cookies): cookies = {} try: tmp = json.loads(raw_cookies)
client_id = re.search(r'(?i)(?:client_id=(?P\w+))', raw_cookies)
i wan to do a push request and a do have an error. For these reason i generate a issue
Thanks