maxurl

2025-12-11 0 900


English | Português (Brasil)


Image Max URL is a program that will try to find larger/original versions of images and videos, usually by replacing URL patterns.

It currently contains support for >9000 hardcoded websites (full list in sites.txt),
but it also supports a number of generic engines (such as WordPress and MediaWiki), which means it can work for many other websites as well.

It is currently released as:

  • Userscript: (most browsers)
    • Stable: userscript_smaller.user.js or OpenUserJS
    • Development: userscript.user.js (recommended)
    • It serves as the base for everything listed below. It also serves as a node module (used by the reddit bot), and can be embedded in a website.
  • Browser extension: Firefox
    • Other browsers supporting WebExtensions can sideload the extension through this git repository.
    • Since addons have more privileges than userscripts, it has a bit of extra functionality over the userscript.
    • Source code is in manifest.json and the extension folder.
  • Website
    • Due to browser security constraints, some URLs (requiring cross-origin requests) can\’t be supported by the website.
    • Source code is in the gh-pages branch.
  • Reddit bot (/u/MaxImageBot)
    • Source code is in reddit-bot/comment-bot.js and reddit-bot/dourl.js

Community:

  • Discord Server
  • Matrix (#image-max-url:tedomum.net)
  • Subreddit

Sideloading the extension

The extension is currently unavailable to other browsers\’ addon stores (such as Chrome and Microsoft Edge),
but you can sideload this repository if you wish to use the extension version instead of the userscript.

  • Repository:
    • Download the repository however you wish (I\’d recommend cloning it through git as it allows easier updating)
    • Chromium:
      • Go to chrome://extensions, make sure \”Developer mode\” is enabled, click \”Load unpacked [extension]\”, and navigate to the maxurl repository
    • Firefox:
      • Go to about:debugging->This Firefox, select \”Load temporary Add-on…\”, and navigate to \”manifest.json\” within the maxurl repository
      • Note that the addon will be deleted once Firefox is closed. There\’s unfortunately nothing I can do about this.
  • CRX (Chromium-based browsers):
    • Download the CRX build from https://g*ith**ub.com/qsniyg/maxurl/blob/master/build/ImageMaxURL_crx3.crx
    • Go to chrome://extensions, make sure \”Developer mode\” is enabled, then drag&drop the downloaded CRX file onto the page.
  • XPI (Firefox-based browsers):
    • Download the XPI build from https://gi**th*ub.com/qsniyg/maxurl/blob/master/build/ImageMaxURL_signed.xpi
    • Go to about:addons, click on the gear icon, then select \”Install Add-on from From File…\”, and navigate to the downloaded XPI file.

Contributing

Any contribution is greatly appreciated! If you have any bug reports, feature requests, or new websites you want supported, please file an issue here.

If you don\’t have a Github account, feel free to either use one of the community links above or contact me directly.

If you wish to contribute to the repository itself (code contributions, translations, etc.), please check CONTRIBUTING.md
for more information.

Integrating IMU in your program

As mentioned above, userscript.user.js also functions as a node module.

var maximage = require(\'./userscript.user.js\');

maximage(smallimage, {
  // If set to false, it will return only the URL if there aren\'t any special properties
  // Recommended to keep true.
  //
  // The only reason this option exists is as a small hack for a helper userscript used to find new rules,
  //  to check if IMU already supports a rule.
  fill_object: true,

  // Maximum amount of times it should be run.
  // Recommended to be at least 5.
  iterations: 200,

  // Whether or not to store to, and use an internal cache for URLs.
  // Set this to \"read\" if you want to use the cache without storing results to it.
  use_cache: true,

  // Timeout (in seconds) for cache entries in the URL cache
  urlcache_time: 60*60,

  // List of \"problems\" (such as watermarks or possibly broken image) to exclude.
  //
  // By default, all problems are excluded.
  // You can access the excluded problems through maximage.default_options.exclude_problems
  // By setting it to [], no problems will be excluded.
  //exclude_problems: [],

  // Whether or not to exclude videos
  exclude_videos: false,

  // This will include a \"history\" of objects found through iterations.
  // Disabling this will only keep the objects found through the last successful iteration.
  include_pastobjs: true,

  // This will try to find the original page for an image, even if it requires extra requests.
  force_page: false,

  // This allows rules that use 3rd-party websites to find larger images
  allow_thirdparty: false,

  // This is useful for implementing a blacklist or whitelist.
  //  If unspecified, it accepts all URLs.
  filter: function(url) {
    return true;
  },

  // Helper function to perform HTTP requests, used for sites like Flickr
  //  The API is expected to be like GM_xmlHTTPRequest\'s API.
  // An implementation using node\'s request module can be found in reddit-bot/dourl.js
  do_request: function(options) {
    // options = {
    //   url: \"\",
    //   method: \"GET\",
    //   data: \"\", // for method: \"POST\"
    //   overrideMimeType: \"\", // used to decode alternate charsets
    //   headers: {}, // If a header is null or \"\", don\'t include that header
    //   onload: function(resp) {
    //     // resp is expected to be XMLHttpRequest-like object, implementing these fields:
    //     //   finalUrl
    //     //   readyState
    //     //   responseText
    //     //   status
    //   }
    // }
  },

  // Callback
  cb: function(result) {
    if (!result)
      return;

    if (result.length === 1 && result[0].url === smallimage) {
       // No larger image was found
       return;
    }

    for (var i = 0; i < result.length; i++) {
      // Do something with the object
    }
  }
});

The result is a list of objects that contain properties that may be useful in using the returned image(s):

[{
  // The URL of the image
  url: null,

  // Whether or not this URL is a video
  video: false,

  // Whether it\'s expected that it will always work or not.
  //  Don\'t rely on this value if you don\'t have to
  always_ok: false,

  // Whether or not the URL is likely to work.
  likely_broken: false,

  // Whether or not the server supports a HEAD request.
  can_head: true,

  // HEAD errors that can be ignored
  head_ok_errors: [],

  // Whether or not the server might return the wrong Content-Type header in the HEAD request
  head_wrong_contenttype: false,

  // Whether or not the server might return the wrong Content-Length header in the HEAD request
  head_wrong_contentlength: false,

  // This is used in the return value of the exported function.
  //  If you\'re using a callback (as shown in the code example above),
  //  this value will always be false
  waiting: false,

  // Whether or not the returned URL is expected to redirect to another URL
  redirects: false,

  // Whether or not the URL is temporary/only works on the current IP (such as a generated download link)
  is_private: false,

  // Whether or not the URL is expected to be the original image stored on the website\'s servers.
  is_original: false,

  // If this is true, you shouldn\'t input this URL again into IMU.
  norecurse: false,

  // Whether or not this URL should be used.
  // If true, treat this like a 404
  // If \"mask\", this image is an overlayed mask
  bad: false,

  // Same as above, but contains a list of objects, e.g.:
  // [{
  //    headers: {\"Content-Length\": \"1000\"},
  //    status: 301
  // }]
  // If one of the objects matches the response, it\'s a bad image.
  // You can use maximage.check_bad_if(bad_if, resp) to check.
  //  (resp is expected to be an XHR-like object)
  bad_if: [],

  // Whether or not this URL is a \"fake\" URL that was used internally (i.e. if true, don\'t use this)
  fake: false,

  // Headers required to view the returned URL
  //  If a header is null, don\'t include that header.
  headers: {},

  // Additional properties that could be useful
  extra: {
    // The original page where this image was hosted
    page: null,

    // The title/caption attached to the image
    caption: null
  },

  // If set, this is a more descriptive filename for the image
  filename: \"\",

  // A list of problems with this image. Use exclude_problems to exclude images with specific problems
  problems: {
    // If true, the image is likely larger than the one inputted, but it also has a watermark (when the inputted one doesn\'t)
    watermark: false,

    // If true, the image is likely smaller than the one inputted, but it has no watermark
    smaller: false,

    // If true, the image might be entirely different from the one inputted
    possibly_different: false,

    // If true, the image might be broken (such as GIFs on Tumblr)
    possibly_broken: false
  }
}]

下载源码

通过命令行克隆项目:

git clone https://github.com/qsniyg/maxurl.git

收藏 (0) 打赏

感谢您的支持,我会继续努力的!

打开微信/支付宝扫一扫,即可进行扫码打赏哦,分享从这里开始,精彩与您同在
点赞 (0)

申明:本文由第三方发布,内容仅代表作者观点,与本网站无关。对本文以及其中全部或者部分内容的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。本网发布或转载文章出于传递更多信息之目的,并不意味着赞同其观点或证实其描述,也不代表本网对其真实性负责。

左子网 建站资源 maxurl https://www.zuozi.net/34924.html

hsluv
上一篇: hsluv
KitX
下一篇: KitX
常见问题
  • 1、自动:拍下后,点击(下载)链接即可下载;2、手动:拍下后,联系卖家发放即可或者联系官方找开发者发货。
查看详情
  • 1、源码默认交易周期:手动发货商品为1-3天,并且用户付款金额将会进入平台担保直到交易完成或者3-7天即可发放,如遇纠纷无限期延长收款金额直至纠纷解决或者退款!;
查看详情
  • 1、描述:源码描述(含标题)与实际源码不一致的(例:货不对板); 2、演示:有演示站时,与实际源码小于95%一致的(但描述中有”不保证完全一样、有变化的可能性”类似显著声明的除外); 3、发货:不发货可无理由退款; 4、安装:免费提供安装服务的源码但卖家不履行的; 5、收费:价格虚标,额外收取其他费用的(但描述中有显著声明或双方交易前有商定的除外); 6、其他:如质量方面的硬性常规问题BUG等。 注:经核实符合上述任一,均支持退款,但卖家予以积极解决问题则除外。
查看详情
  • 1、左子会对双方交易的过程及交易商品的快照进行永久存档,以确保交易的真实、有效、安全! 2、左子无法对如“永久包更新”、“永久技术支持”等类似交易之后的商家承诺做担保,请买家自行鉴别; 3、在源码同时有网站演示与图片演示,且站演与图演不一致时,默认按图演作为纠纷评判依据(特别声明或有商定除外); 4、在没有”无任何正当退款依据”的前提下,商品写有”一旦售出,概不支持退款”等类似的声明,视为无效声明; 5、在未拍下前,双方在QQ上所商定的交易内容,亦可成为纠纷评判依据(商定与描述冲突时,商定为准); 6、因聊天记录可作为纠纷评判依据,故双方联系时,只与对方在左子上所留的QQ、手机号沟通,以防对方不承认自我承诺。 7、虽然交易产生纠纷的几率很小,但一定要保留如聊天记录、手机短信等这样的重要信息,以防产生纠纷时便于左子介入快速处理。
查看详情

相关文章

猜你喜欢
发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务