Pages:
Author

Topic: [Script] Imgur to TalkImg - automatically fix your broken images - page 2. (Read 2052 times)

legendary
Activity: 2758
Merit: 6830
Imgur images are broken again! Feel free to use the script if you haven't already.
legendary
Activity: 1638
Merit: 4508
**In BTC since 2013**
You decide: here's the 10,000 largest images. Check a few of them, and see if they're worth saving. Judging by the file size, I already see a few duplicates.

If you allow images >2.5MB, you shouldn't provide [img]-tags for them, and add a warning that it can only be linked.

Yeah... I think it's better to guarantee the limit, for a better forum experience.
Larger images are linked by the forum as external links/files, so each one manages this as they see fit.

Perhaps if in the future I manage to add some warning element in this regard, I will try to do so.
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
What size could be reasonable to allow uploading? Do you think 5MB would be acceptable?
@LoyceV based on your collection, what value do you think is reasonable?
You decide: here's the 10,000 largest images. Check a few of them, and see if they're worth saving. Judging by the file size, I already see a few duplicates.

If you allow images >2.5MB, you shouldn't provide [img]-tags for them, and add a warning that it can only be linked.
legendary
Activity: 1638
Merit: 4508
**In BTC since 2013**
I know that. I believe the image was only linked (not embedded through the [img] tag), so it wasn't using the forum proxy. The script looks for all links (embedded or not), so it was trying to upload it anyway.

I still think it's worth uploading it, since imgur could delete our images at any time.

Right... I hadn't thought about that perspective.

What size could be reasonable to allow uploading? Do you think 5MB would be acceptable?
@LoyceV based on your collection, what value do you think is reasonable?
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
the image was only linked (not embedded through the [img] tag)
~
I still think it's worth uploading it, since imgur could delete our images at any time.
Good point, I only downloaded the embedded images, but links might contain some forum history too.
legendary
Activity: 2758
Merit: 6830
Just remember that the limit is the forum proxy itself. TalkImg can be any size, but as it wouldn't work on the forum, it's not worth uploading. Roll Eyes
I know that. I believe the image was only linked (not embedded through the [img] tag), so it wasn't using the forum proxy. The script looks for all links (embedded or not), so it was trying to upload it anyway.

I still think it's worth uploading it, since imgur could delete our images at any time.
legendary
Activity: 1638
Merit: 4508
**In BTC since 2013**
I removed it because most .gif links posted by me were hitting TalkImg's size limit... but I guess it makes sense to include them by default anyway.

Just remember that the limit is the forum proxy itself. TalkImg can be any size, but as it wouldn't work on the forum, it's not worth uploading. Roll Eyes
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
I removed it because most .gif links posted by me were hitting TalkImg's size limit...
In all files I've downloaded from imgur, about 5% of the .gif files is above the size limit.
legendary
Activity: 2758
Merit: 6830
If you add .gif you have everything Smiley
I removed it because most .gif links posted by me were hitting TalkImg's size limit... but I guess it makes sense to include them by default anyway.

From:
Code:
/https:\/\/i\.imgur\.com\/.*?\.(png|jpg|jpeg)/gi

To:
Code:
/https:\/\/i\.imgur\.com\/.*?\.(png|jpg|jpeg|gif)/gi
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
It currently only matches imgur links ending with png, jpg, jpeg.
If you add .gif you have everything Smiley
legendary
Activity: 1638
Merit: 4508
**In BTC since 2013**
Yes, you can. I've added a imageLinkRegex variable at the top. It currently only matches imgur links ending with png, jpg, jpeg.

Thanks for the tip.
As soon as I have some time I will test it and give feedback.  Wink
legendary
Activity: 2758
Merit: 6830
Imagine that I have images on Imgbb and I want to transfer them to TalkImg, is it possible?
Forgot to reply this one, sorry.

Yes, you can. I've added a imageLinkRegex variable at the top. It currently only matches imgur links ending with png, jpg, jpeg (edit: and gif).

If you want to match ONLY imgbb images, you can use:

Code:
/https:\/\/i\.ibb\.co\/.*?\.(png|jpg|jpeg|gif)/gi

If you want to match BOTH imgbb and imgur images:

Code:
/https:\/\/i\.ibb\.co\/.*?\.(png|jpg|jpeg|gif)|https:\/\/i\.imgur\.com\/.*?\.(png|jpg|jpeg|gif)/gi
legendary
Activity: 2758
Merit: 6830
It's still same to me, neither link works nor script, why isn't there response to this yet?
It's just a github file which is valid and working. The issue is on your end (either your browser or your connection?).

But anyways, I edited the script and put the link behind my proxy. See if it works: https://proxy.ninjastic.space/?url=https://raw.githubusercontent.com/mathiasbynens/emoji-test-regex-pattern/main/dist/latest/javascript.txt
hero member
Activity: 2464
Merit: 934
I'm getting this error.


Run it again. The script requires loading a full emoji regex to match and not break them: https://raw.githubusercontent.com/mathiasbynens/emoji-test-regex-pattern/main/dist/latest/javascript.txt

When if I try to open mentioned link manually, I get same timeout error in browser.

It's still same to me, neither link works nor script, why isn't there response to this yet?
legendary
Activity: 3668
Merit: 6382
Looking for campaign manager? Contact icopress!
TalkImg API returned an error, let me know if you're still getting this.

No. I've ran it again right after that and it managed to handle all the pages of my history without errors (well, excepting a few too large images and a couple of locked topics, but it's okay).
Sorry for the late answer and thanks.
hero member
Activity: 2464
Merit: 934
I'm getting this error.


Run it again. The script requires loading a full emoji regex to match and not break them: https://raw.githubusercontent.com/mathiasbynens/emoji-test-regex-pattern/main/dist/latest/javascript.txt

When if I try to open mentioned link manually, I get same timeout error in browser.
legendary
Activity: 2758
Merit: 6830
I'm getting this error.


Run it again. The script requires loading a full emoji regex to match and not break them: https://raw.githubusercontent.com/mathiasbynens/emoji-test-regex-pattern/main/dist/latest/javascript.txt

I've just got a different one:


TalkImg API returned an error, let me know if you're still getting this.
legendary
Activity: 3668
Merit: 6382
Looking for campaign manager? Contact icopress!
I've just got a different one:

hero member
Activity: 2464
Merit: 934
I'm getting this error.



legendary
Activity: 2254
Merit: 2852
#SWGT CERTIK Audited
All BBCode is visible on the post. Usually, it appears when the post is still being edited.
Sorry, that was my bad. I was trying to fix the emojis and broke the bbcodes for a moment. Fixed just a moment later but you were one of the victims. :P

Here is yet another script that should fix your posts with broken bbcode: https://gist.github.com/ninjastic/d560848568339e5a2d7a25ddffb578d5

All it does is find those posts and refresh them (a.k.a edit without any change).
Thanks, TryNinja, for the script to fix the broken post.
Previously, I thought Bitcointalk needed time to refresh the display of posts, as when changing avatars, which sometimes took several minutes.

But after a day has passed, it still hasn't been updated. I had time to edit (without any changes) manually on several posts that I found were broken.
Pages:
Jump to: