Closed mjeveritt closed 3 years ago
Hello,
Thanks for reporting it. Updating the location regex for pinnwand does the trick. I'll send a PR later with the fix, but it's basically:
Changing this line:
REGEX_LOC_pinnwand="\(/show/[^ ]*\).*$|https://bpaste.net\1"
For this one:
REGEX_LOC_pinnwand="\(/[^ ]*\).*$|https://bpaste.net\1"
Thanks - I'll give that a roll locally! :smiley:
Seems to work fine here - is it a good opportunity to add a commit to change the output URL to the new 'bpa.st' format yet?
Seems to work fine here - is it a good opportunity to add a commit to change the output URL to the new 'bpa.st' format yet?
I think it is, yes. You could create a PR to get some feedback, or did you mean to include it in mine?
I can do either ... :smiley:
Hmm, looking more closely, the bpa.st endpoint doesn't accept the 'old'/deprecated method of POST that wgetpaste is using, so we need to transition to JSON and use one of https://pinnwand.readthedocs.io/en/latest/usage.html . This is a little more involved than I'd hoped we could achieve with a couple of URL changes .. and perhaps a fresh PR/issue is worthwhile after all !
Hey! In case you want to give it a try, I just made the changes here: https://raw.githubusercontent.com/bcattaneo/wgetpaste/feature/bpaste_v1_api/wgetpaste
@nvinson @Cogitri any chance of merging this? (or its successor)
@mjeveritt I cannot merge it (no write permissions), so it is up to @Cogitri . However, I'd rather see #16 updated and merged. If @bcattaneo isn't interested in it anymore, I'll take up the task of updating it.
Thanks @nvinson :)
When bpaste (or more recently bpa.st) throws a 304 redirect, it confuses wgetpaste and it fails. However, running with --verbose or --debug you can see the request is sent successfully and a URL is generated, it just fails to be parsed correctly.