thunar-upload-to-postimage.sh not working
wincak opened this issue · 1 comments
wincak commented
The thunar-upload-to-postimage.sh script does not work for me (anymore?). After the "upload", the zenity popup just displays
https?://([^/
When I try to display the curl output file, it seems to be just the postimage front page.
It might be because they changed the website recently, there is even a "Return to the old site" link at the bottom of the page.
As a temporary hack, it is still possible to use the old interface. (I don't want to submit this as a pull request, because it is too nasty)
- Change curl upload address to old.postimage.org
- Change the grep pattern of resulting webpage
ZTEXT="$(echo "${TEXT}" | grep -E -o '\w*.postimg.org/[[:alnum:]]+/[[:graph:]]+.(jpg|gif|png)' | awk 'NR==2')"
This modification looks for image links according to a rough pattern and then uses the second one, because that seems to be the "Direct Link" image.