imgur

How do you get access_token and refresh_token from Imgur?

[亡魂溺海] 提交于 2020-01-23 10:01:30
问题 Project I am using: ImgurNet from nuget (source: https://github.com/0xdeafcafe/ImgurNet) It seems like it needs all those parameters: { "client_id": "Insert your imgur client_id here", "client_secret": "Insert your imgur client_secret here", "access_token": "Insert your imgur access_token here", "refresh_token": "Insert your imgur refresh_token here", "authorized_username": "Insert your imgur username here" } ...while in imgur I am only able to get client_id + client_secret . The Imgur API

How can be scraped using PHP curl a webpage with infinite scroll?

孤人 提交于 2020-01-03 19:44:14
问题 I'd like to know how can be scraped in a loop (page 1 page 2etc....) a webpage which has infinite loops (like imgur) for example ... ? I tried the code below, but it returns only the first page. How can I trigger the next page due to infinite scrolling template? <?php $mr = $maxredirect === null ? 10 : intval($maxredirect); if (ini_get('open_basedir') == '' && ini_get('safe_mode' == 'Off')) { curl_setopt($ch, CURLOPT_FOLLOWLOCATION, $mr > 0); curl_setopt($ch, CURLOPT_MAXREDIRS, $mr); curl

Anonymous Uploading File object to Imgur API (JSON) gives Authentication Error 401

烈酒焚心 提交于 2019-12-30 05:12:08
问题 I've created a class UploadToImgurTask as an AsyncTask that takes a single file path parameter, creates and sets an MultiPartEntity, and then uses Apache HttpClient to upload the image with said entity. The JSON response from Imgur is saved in a JSONObject, the contents of which I display in LogCat for my own understanding. Here's a screenshot of the JSON I receive from Imgur: I looked up error Status 401 on api.imgur.com and it says that I need to authenticate using OAuth despite the fact

CORS issues with jQuery Dropzone and upload to Imgur

牧云@^-^@ 提交于 2019-12-28 18:13:32
问题 I tried to use jQuery Dropzone to upload an image to Imgur or any other domain but that's not working. This is my dropzone setup: $("div.dropzone").dropzone success: -> console.log arguments paramName: "image" method: "post" maxFilesize: 2 url: "https://api.imgur.com/3/upload" headers: Authorization: "Client-ID *************" This doesn't work. It says that return code is 0. The request headers: Host: api.imgur.com User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:31.0) Gecko/20100101 Firefox/31.0

imgurpython.helpers.error.ImgurClientRateLimitError: Rate-limit exceeded

╄→гoц情女王★ 提交于 2019-12-25 08:09:11
问题 I have the following error: /usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning. InsecurePlatformWarning /usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/util/ssl_.py:90:

Imgur uploads working via client-side javascript but not node.js. Flummoxed

我的未来我决定 提交于 2019-12-25 01:43:03
问题 This works: $.post( 'http://api.imgur.com/2/upload.json', { key: 'dsfdwerwersf53534dfsfse3', image: 'http://i.imgur.com/UH17u.png' }, function( data ) { console.log( data.upload.links.original ); } ); When I run this in Chrome's console, imgur sends me the url of the uploaded image right away: http://i.imgur.com/KrHMY.png . Excellent. . Now I'm try the same thing on the server-side using node.js but it doesn't work: var express = require( 'express' ) , app = express.createServer() , request =

Getting a 403 from BufferedReader

吃可爱长大的小学妹 提交于 2019-12-24 02:41:17
问题 I'm trying to upload an image to imgur, I am getting a response from the site but it returns me with null : {"data":{"error":"Malformed auth header","request":"/3/image","parameters":"image = iVBORw0KGgoAAAANSUhEUgAAB4AAAASwCAIAAACVUsChAACAAElEQVR42uzdCXebyrI2YEuyY8fzPCbZOyfZd597v///...","method":"POST"},"success":false,"status":403} A 403 error on the imgur documentation says Forbidden. You don't have access to this action. If you're getting this error, check that you haven't run out of API

Only limited number of pages can be retrieved

萝らか妹 提交于 2019-12-24 00:25:14
问题 I wonder why I can't retrieve more pages of data after page 165? page number is: 165 4 image/gif page number is: 165 13 page number is: 165 3 page number is: 165 /usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html

A Bash script to upload images to imgur.com automatically asking for new access_token

我是研究僧i 提交于 2019-12-23 01:54:26
问题 I was wondering if there's an already written Bash script which will be capable of uploading images to imgur.com along with automating the process of requesting new access token once it expire. Searching for such a script I found a few which do not support OAuth2: Quoted from Imgur's OAuth2.0 overview The Imgur API uses OAuth 2.0 for authentication. OAuth 2.0 has four steps: registration, authorization, making the request, and getting new access_tokens after the initial one expired .

Exception thrown when WebAuthenticationBroker receives an OAuth2 callback

天大地大妈咪最大 提交于 2019-12-22 10:39:08
问题 The WebAuthenticationBroker doesn't seem to be able to handle navigation to my ms-app:// . Just throws this ugly error as you will see below. Steps Call AuthenticateAsync() , including callback uri obtained at runtime: WebAuthenticationBroker.GetCurrentApplicationCallbackUri() Go through authorize process, hit Allow . Instead of returning, the broker shows the page Can't connect to service. We can't connect to the service you need right now. Unable to do anything, so I hit the Back button