Bitcoin Forum
May 09, 2024, 06:48:23 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 3 4 5 6 [7]  All
  Print  
Author Topic: [Script] Imgur to TalkImg - automatically fix your broken images  (Read 2068 times)
joker_josue
Legendary
*
Online Online

Activity: 1652
Merit: 4564


**In BTC since 2013**


View Profile WWW
November 12, 2023, 04:32:41 PM
Merited by TryNinja (1)
 #121

Let's wait for TryNinja just in case. I guess the API key needs to be updated as well. If you use imgbb, you need to edit the API key in the code and enter your own. The API code is already set by default for your site, TalkImg, but it can also be edited. vgy.me surely has unique API codes as well. 

The API code is just for the script to upload to TalkImg.
The script does not use other API codes, it just takes the image link and sends it to TalkImg via API.


Note this explanation:
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

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
1715280503
Hero Member
*
Offline Offline

Posts: 1715280503

View Profile Personal Message (Offline)

Ignore
1715280503
Reply with quote  #2

1715280503
Report to moderator
1715280503
Hero Member
*
Offline Offline

Posts: 1715280503

View Profile Personal Message (Offline)

Ignore
1715280503
Reply with quote  #2

1715280503
Report to moderator
1715280503
Hero Member
*
Offline Offline

Posts: 1715280503

View Profile Personal Message (Offline)

Ignore
1715280503
Reply with quote  #2

1715280503
Report to moderator
Transactions must be included in a block to be properly completed. When you send a transaction, it is broadcast to miners. Miners can then optionally include it in their next blocks. Miners will be more inclined to include your transaction if it has a higher transaction fee.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715280503
Hero Member
*
Offline Offline

Posts: 1715280503

View Profile Personal Message (Offline)

Ignore
1715280503
Reply with quote  #2

1715280503
Report to moderator
1715280503
Hero Member
*
Offline Offline

Posts: 1715280503

View Profile Personal Message (Offline)

Ignore
1715280503
Reply with quote  #2

1715280503
Report to moderator
1715280503
Hero Member
*
Offline Offline

Posts: 1715280503

View Profile Personal Message (Offline)

Ignore
1715280503
Reply with quote  #2

1715280503
Report to moderator
TryNinja (OP)
Legendary
*
Offline Offline

Activity: 2828
Merit: 6983



View Profile WWW
November 12, 2023, 04:34:38 PM
Merited by LoyceV (6), Pmalek (2), vapourminer (1)
 #122

I was wondering if there is a quick way to add new image hosts to the code? A few years ago, I used vgy.me for images in some of my threads. Perhaps the script could be used to automatically replace those links as well.  
Yes, there is.

joker_josue is correct. The following line is used to grab the images which are then uploaded to talkimg:

Code:
const imageLinkRegex = /https:\/\/i\.imgur\.com\/.*?\.(png|jpg|jpeg|gif)/gi

For vgy.me, you would probably use:

Code:
const imageLinkRegex = /https:\/\/vgy\.me\/.*?\.(png|jpg|jpeg|gif)/gi

Or for both imgur and vgy.me:

Code:
const imageLinkRegex = /https:\/\/vgy\.me\/.*?\.(png|jpg|jpeg|gif)|https:\/\/i\.imgur\.com\/.*?\.(png|jpg|jpeg|gif)/gi

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
Pmalek
Legendary
*
Offline Offline

Activity: 2758
Merit: 7136



View Profile
November 12, 2023, 06:08:13 PM
 #123

OK, it worked to some degree. The images that are still available and uploaded on vgy.me are now available with a TalkImg link. But it seems that for some reason vgy.me deleted most of the images I uploaded years ago. Those are unfortunately lost now. But that's not something that you can do anything about.

Excellent service, thanks a lot!

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
ChiBitCTy
Legendary
*
Offline Offline

Activity: 2254
Merit: 3009



View Profile
May 05, 2024, 11:04:23 AM
 #124

I know some will be quite shocked, but I finally tried to run this, and uhh , coming up short...story of my life.

I read at least 6-7 articles on how to properly run a script, but not one explained how on a 1990's AOL Script Kiddie level of savy..thats more my speed.  Read through this thread best as I could (it's late, bout to east a snack and pass the f out).

I would post the exact errors but I dunno if by providing exposing anything I shouldn't.. but top error "Uncaught type error: Fail to execute"  then a second warning telling me I'm an idiot and not to post code I don't understand...They pegged me dead on there.

Any guidance would be much appreciated!  I have quite a few topics I worked hard on that need to img fixed and would sldo benefit those down the road to stay looking nice (here's what I tried to work on- https://bitcointalk.org/index.php?topic=5174217.0 ).  Sorry for being a dumbass ya'll.  cheers-ty


Had more to write,.just fell asleep doing it..all for now..thanks my friends for any guidance! 

███████████████████████████
███████▄████████████▄██████
████████▄████████▄████████
███▀█████▀▄███▄▀█████▀███
█████▀█▀▄██▀▀▀██▄▀█▀█████
███████▄███████████▄███████
███████████████████████████
███████▀███████████▀███████
████▄██▄▀██▄▄▄██▀▄██▄████
████▄████▄▀███▀▄████▄████
██▄███▀▀█▀██████▀█▀███▄███
██▀█▀████████████████▀█▀███
███████████████████████████
.
.Duelbits.
..........UNLEASH..........
THE ULTIMATE
GAMING EXPERIENCE
DUELBITS
FANTASY
SPORTS
████▄▄█████▄▄
░▄████
███████████▄
▐███
███████████████▄
███
████████████████
███
████████████████▌
███
██████████████████
████████████████▀▀▀
███████████████▌
███████████████▌
████████████████
████████████████
████████████████
████▀▀███████▀▀
.
▬▬
VS
▬▬
████▄▄▄█████▄▄▄
░▄████████████████▄
▐██████████████████▄
████████████████████
████████████████████▌
█████████████████████
███████████████████
███████████████▌
███████████████▌
████████████████
████████████████
████████████████
████▀▀███████▀▀
/// PLAY FOR  FREE  ///
WIN FOR REAL
..PLAY NOW..
TryNinja (OP)
Legendary
*
Offline Offline

Activity: 2828
Merit: 6983



View Profile WWW
May 08, 2024, 12:00:59 AM
Merited by fillippone (4)
 #125

Any guidance would be much appreciated!  I have quite a few topics I worked hard on that need to img fixed and would sldo benefit those down the road to stay looking nice (here's what I tried to work on- https://bitcointalk.org/index.php?topic=5174217.0 ).  Sorry for being a dumbass ya'll.  cheers-ty
Have you tried the "Single Topic" version?

"Single Topic" version

Get the code here: https://gist.github.com/ninjastic/59bde80306c32153a5775b9a570b16b7

Run it on any topic and all images posted by you will be updated.

IMPORTANT: only images that are shown on the screen! This means that if you are on page 1, the script won't update the images on page 2. You can use the ;all page on the forum to make all posts show up all at once (probably won't work properly if the topic is huge?).

Just go to the topic you want to update (read the disclaimer above), copy the entire thing, open your console's developer tools console (on Chrome/Edge: Ctrl + Shift + I), paste it, run it.

Let me know of any errors you get.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
Pages: « 1 2 3 4 5 6 [7]  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!