I have been recently trying to download my own Udemy courses, as I always did, with Udemy-dl software but I am having the following error:
For about a week, when I do not use token I get this:
[i] : Trying to login using session cookie
[-] : Udemy Says: 403 Forbidden session cookie seems to be expired...
[i] : Updating session cookie..
cloudscraper.exceptions.CloudflareCaptchaProvider: Cloudflare Captcha detected, unfortunately you haven't loaded an anti Captcha provider correctly via the 'captcha' parameter.
Also have these errors, but now when I use token. This is the command I used with token:
python udemy-dl.py https://www.udemy.com/course/python-course/learn/lecture/45714954?start=15#overview -k token.txt -q 1080 -o "C:\My Files"
[i] : Trying to login using session cookie
[-] : Udemy Says: 403 Forbidden session cookie seems to be expired...
[i] : Updating session cookie..
[i] : Logged in successfully.
[-] : Udemy Says: 403 Forbidden on www.udemy.com/api-2.0/users/me/subscribed-courses?fields[course]=id,url,published_title&page=1&page_size=1000&ordering=-last_accessed,-access_time&search=python-course
I have tried several times to empty cookies in by Mozilla browser, log out and in from Udemy.com and update the actual access_token at token.txt, but the error persists when I go back to python.
What should I do?
Related
When I am trying to call the API from POSTMAN in Airflow DAG, I am facing a 403 Forbidden error.
I have enabled the headers for basic authentication with the username and password in Postman. In the airflow.cfg file, I have enabled auth_backend = airflow.contrib.auth.backends.password_auth. This error occurs when I attempt to work solely in Postman. When I copy the same URL and try it directly in the browser, I am able to access the link.
I'm having trouble with authorization now that I've enabled authentication.
I attempted to use the curl command but received the same forbidden error.
The airflow version is 1.10.
The basic auth seems fine, it is base64 encoded already. 403 means you are authorized in the application but this specific action is forbidden. In airflow there are different roles admin/dag manager/operator and not all roles are allowed to do DAG operations. Can you specify the user role and operations you try to do? Have in mind that base64 auth string can be easily decoded to plain text and people can see your username and password.
In the picture you have shared the verb you are using is POST, opening the link in tbe browser is probably a GET operation which is different in terms of permissions required.
Hi I am trying to connect to Jira python package JIRA
Here is command
j_url = 'https://myserver.com/jira'
JIRA(j_url, auth=(user, pass), max_retries=5)
I am getting the following error. I was not getting this error before. Only thing is changed, I did changed my password yesterday and it failed few times
JIRAError: JiraError HTTP 403 url: https://xxxxxxx/jira/rest/auth/1/session
text: CAPTCHA_CHALLENGE; login-url=xxxxxx/jira/login.jsp
Any idea what could be possible issue here?
It is solved now.
There is Current failed logins count in Jira profile. If it exceed certain threshold then API is failing. You need to get it reset by Admin
Cannot upload/download entities from Cloud Datastore.
In the past I used the bulkloader utility to upload/download entities to the Datastore. Now when I try I get a error traceback ending with: oauth2client.client.ApplicationDefaultCredentialsError: The Application Default Credentials are not available. They are available if running in Google Compute Engine. Otherwise, the environment variable GOOGLE_APPLICATION_CREDENTIALS must be defined pointing to a file defining the credentials. See https://developers.google.com/accounts/docs/application-default-credentials for more information.
I've followed the suggestions on that the link, but then I get this error:
2019-10-07 08:18:28,017 INFO client.py:546 Attempting refresh to obtain initial access_token
2019-10-07 08:18:28,246 INFO client.py:804 Refreshing access_token
Error 302:
--- begin server output ---
--- end server output ---
I've tried including the --oauth2 key with both --oauth2_access_token and the ---oauth2_refresh_token (all keys have Owner Permissions) but I keep getting the 302 refresh error.
c:\python27\python appcfg.py download_data --config_file=bulkloader.yaml --filename=MyTable.csv --kind=MyTable --url http://google.appspot.com/remote_api --application=google
INFO client.py:804 Refreshing access_token
Error 302:
Does anyone have a suggestion what I might try to get this to work? Is anyone still using the bulk-loader?
I think that what you are looking for is in the document "Exporting and Importing Entities" https://cloud.google.com/datastore/docs/export-import-entities
I'm running app engine locally, with the Google vision API. I'm using the application default credentials for OAuth and building the API client to do label detection. Whenever I create the object it will refresh the credentials
DISCOVERY_URL = 'https://{api}.googleapis.com/$discovery/rest?version={apiVersion}'
class VisionApi(object):
def __init__(self):
self.vision = self._create_client()
def _create_client(self):
credentials = GoogleCredentials.get_application_default()
return discovery.build(
'vision', 'v1', credentials=credentials,
discoveryServiceUrl=DISCOVERY_URL)
This worked just fine yesterday, and I haven't changed it. When I try to use it today, it attempts to get the credentials twice, and then I get the following 401 error:
INFO 2017-08-16 18:12:14,228 discovery.py:863] URL being requested: POST https://vision.googleapis.com/v1/images:annotate?alt=json
INFO 2017-08-16 18:12:14,228 transport.py:157] Attempting refresh to obtain initial access_token
WARNING 2017-08-16 18:12:14,237 urlfetch_stub.py:504] Stripped prohibited headers from URLFetch request: ['content-length']
INFO 2017-08-16 18:12:14,542 transport.py:185] Refreshing due to a 401 (attempt 1/2)
WARNING 2017-08-16 18:12:14,544 urlfetch_stub.py:504] Stripped prohibited headers from URLFetch request: ['content-length']
INFO 2017-08-16 18:12:14,823 transport.py:185] Refreshing due to a 401 (attempt 2/2)
WARNING 2017-08-16 18:12:14,826 urlfetch_stub.py:504] Stripped prohibited headers from URLFetch request: ['content-length']
HttpError: <HttpError 401 when requesting https://vision.googleapis.com/v1/images:annotate?alt=json returned "Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.">
Why was this working yesterday but isn't working today? I understand that I can go the route of using server-to-server credentials, but it worked without that and I would prefer to continue using the API without that.
I've run into some snags in downloading reports through Facebook API.
From documentation https://developers.facebook.com/docs/payments/developer_reports_api/
#Example company access_token request
#Sample developer request for a daily detail report:
wget "https://paymentreports.facebook.com/234599349987627/report?
date=2012-05-15&
type=detail&
access_token=234599349987627|aBc_dEFaEUZbqpatkrp8pbtwXyZ"
#The request above would return a file named 234599349987627_detail_2012-05-15.csv.zip.
However, when in a python script I am writing, using urllib2 to fetch the file described:
url = "https://paymentreports.facebook.com/%s/report?date=%s&type=%s&access_token=%s" % (COMPANY_ID, DATE, reporttype, ACCESS_TOKEN)
reportszipped = ZipFile(StringIO(urllib2.urlopen(url).read()))
I get an HTTP Error:
{"error":{"message":"Access denied.: Access denied due to invalid credentials."}}
I know that my company_id and access_token are correct, having followed the instructions described in the documentation to generate it (without errors). wget the same URL returns the same HTTP Error.
Am I missing something here?
Have you enabled an app for payments, since facebook states on the developer page that:
Before you can proceed, you'll need to make sure that you've enabled
an app for payments, including setting up a company to receive
payments. Once you've done that, you'll find your company ID and
secret on your Company Settings page.
Check out this page here.