Comments (16)
Re: auth issues -- did you manage to extract consumer key from the browser devtools? It should look similar to the consumer key that worked for you (from the app you registered), just a bit different.
I actually wonder if it's just public, you can find it on Github :D Maybe I should just hardcode it... https://github.com/veltzer/pyscrapers/blob/4586f55d0569b620924f42949dfaa2ebe5381bc6/pyscrapers/workers/getpocket.py#L17
After that, did you follow step 3? https://github.com/karlicoss/pockexport#setting-up You'll need a different access_token for a different consumer key, but once you got it it should work (I haven't had to renew mine since I set it up)
from pockexport.
OMG that does the trick! Thank you so much! I was using the wrong consumer key that I had extracted from https://getpocket.com/my-list since that's what https://app.pocket.com redirected to. I should have caught that sooner. You should probably put that consumer key in the readme.
from pockexport.
Yeah, this worked actually thanks a lot :)
from pockexport.
Can someone post the full revised steps? The documented readme steps don't do the job.
pocket.RateLimitException: User was authenticated, but access denied due to lack of permission or rate limiting. Invalid consumer key.
Nevermind -- my issue was grabbing the wrong key.
Following up on this, the request to authorize the app still doesn't work with the correct
consumer_key
. I tried https://github.com/tapanpandita/pocket#oauth in order to get the access_token, but still get an error:pocket.RateLimitException: User was authenticated, but access denied due to lack of permission or rate limiting. User rejected code.
@jordan8037310 Retrieving the key by opening up devtools on the Pocket web app didn't work for me. I had to use the hardcoded consumer_key
mentioned in #6 (comment)
from pockexport.
Hmm, sorry not sure, don't think I ever seen such an issue...
Curious, if you try the 'lawful good' way with creating a new app, does it work? Maybe it would help to debug.
And no worries, deleted the previous version!
from pockexport.
Unfortunately, that doesn't work either. Perhaps I'm doing something wrong.
They do work! I was using the wrong consumer key initially. However, I don't have my highlights.
I wonder if a consumer key mismatch is behind the previous error. Could you guide me through properly fetching my web consumer key just to be sure?
I also hit a unicode encoding problem. Here's the log:
Traceback (most recent call last):
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\User\AppData\Roaming\Python\Python39\site-packages\pockexport\export.py", line 67, in <module>
main()
File "C:\Users\User\AppData\Roaming\Python\Python39\site-packages\pockexport\export.py", line 51, in main
dumper(js)
File "C:\Users\User\AppData\Roaming\Python\Python39\site-packages\pockexport\exporthelpers\export_helper.py", line 63, in dump_to_stdout
sys.stdout.write(data)
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\encodings\cp1252.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u0142' in position 9380: character maps to <undefined>
This is probably a library error and I'll likely have to open an issue upstream. Any recommendations meanwhile to get around this issue or be able to use the highlight export method?
from pockexport.
So, I did find a way around this issue. I exported it to a file since
doesn't encode to UTF-8 but
does. I figured that I had to export to a file since you did have export path handling but it wasn't in the readme lol. I ended up figuring out how to use it from the -h
flag which I was foolish enough to ignore.
Reference: https://stackoverflow.com/questions/27092833/unicodeencodeerror-charmap-codec-cant-encode-characters
from pockexport.
Re: utf-8 error. Hmm thanks, maybe it's some windows specific issue since I think Linux terminals can handle UTF-8 well? In fact the encoding='utf-8'
in the second snippet was added by someone who was using Windows as well, it worked winthout it on OSX/Linux too. Don't know much details how it works behind the scenes.. maybe it guesses from the locale settings or something like that.
P.S. ah yes, your stackoverflow link kind of suggests the same. Although PYTHONIOENCODING
isn't set for me on Linux, so there still must be some locale stuff going on
from pockexport.
Thanks for the explanation. I'm still trying to figure out what the problem is behind the other method. I wanted to integrate highlight exporting into my workflow and this seems like the best bet so far if I don't want to go through third party services. I suspect that a new access token is required every time I use the export. Does all this work fine on your end? If so, I'll probably give this a try through WSL. though that may be problematic since I won't have an X server running.
from pockexport.
Faced the same issue using the webapp method, got things working only after the intended way to get the consumer_key
. i.e. applying via the developer portal. So no more highlights :(
from pockexport.
Hey, I did manage to extract my highlights. Maybe I could help?
from pockexport.
Sure, would like to know more, did you use the above hard-coded key? Or any other procedure?
I actually had setup this up sometime before. So, could potentially be some sort of deactivation as well.
from pockexport.
I used the hard coded key and used that to generate the access token. After that, everything worked out.
from pockexport.
Can someone post the full revised steps? The documented readme steps don't do the job.
pocket.RateLimitException: User was authenticated, but access denied due to lack of permission or rate limiting. Invalid consumer key.
Nevermind -- my issue was grabbing the wrong key.
Following up on this, the request to authorize the app still doesn't work with the correct consumer_key
. I tried https://github.com/tapanpandita/pocket#oauth in order to get the access_token, but still get an error:
pocket.RateLimitException: User was authenticated, but access denied due to lack of permission or rate limiting. User rejected code.
from pockexport.
@jordan8037310 sorry for not replying earlier! I missed this somehow.
from pockexport.
pocket.RateLimitException: User was authenticated, but access denied due to lack of permission or rate limiting. User rejected code.
I get this regardless of what key I use. Is it safe to assume Pocket has closed this loophole ?
from pockexport.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
đ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. đđđ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google â¤ī¸ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pockexport.