https://github.com/spitfire-666/imagus
https://github.com/spitfire-666/imagus
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/spitfire-666/imagus
- Owner: SpitFire-666
- Created: 2022-10-20T04:21:12.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-10-20T04:23:44.000Z (about 3 years ago)
- Last Synced: 2025-01-12T16:22:20.821Z (10 months ago)
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Imagus
ebay
```
{"R_eBay":{"link":"^(?:(?:(?:be\\w\\w|viewitem\\.eim|cgi)\\.)?ebay\\.(?:a[pt]|[bd]e|c[ahnz]|co(?:m(?:\\.(?:au|hk|my|sg|tw))?|\\.(?:th|uk))|es|f[ir]|gr|[hr]u|i[ent]|n[lo]|p[hl]|vn)/(?:itm/)?[^/?]*[?/](?:item=)?|chodientu\\.vn/ebay-item-)(\\d{8,19}).*","res":":\nconst rx =\n /img src=\"([^\"]+)\" style=\"max\\-width:64px;max\\-height:64px\"\\s+index=\"\\d+\"/g;\nconst matches = [...$._.matchAll(rx)];\nif (matches.length)\n return matches.map(item => [item[1].replace(/s\\-l\\d+\\./, 's-l9999.'), '']);\n\nconst scriptSrc = $._.match(/mediaList\":(\\[.*?)<\\/script>/)?.[1];\nif (!scriptSrc) return;\n\n// Find where the mediaList array ends.\nlet counter = 0,\n end;\nfor (let i = 0; i < scriptSrc.length; i++) {\n if (scriptSrc[i] === '[') counter++;\n if (scriptSrc[i] === ']') counter--;\n if (counter === 0) {\n end = i + 1;\n break;\n }\n}\n\ntry {\n return JSON.parse(scriptSrc.slice(0, end)).map(m => [\n m?.image?.originalImg?.URL.replace(/s\\-l\\d+\\./, 's-l9999.'),\n m?.image?.originalImg?.title.trim(),\n ]);\n} catch (e) {\n console.log(`eBay Sieve didn't work. Error: ${e}`);\n return;\n}\n","img":"^((?:ssl)?i\\d*\\.ebayimg\\.com/)(?:(?:thumbs/)?(images/[a-z]/[^/]+/s-l)[^.]+|((?:t/[^/]+/)?\\d+/[^_]+(?:~~\\d*)?)_(?!32)\\d+\\.)","to":":\nreturn $[1]+($[2] ? $[2]+'1600' : $[3]+'_32.')","note":"gpl2731\nhttp://forum.ru-board.com/topic.cgi?forum=5&topic=50874&start=1160#12\nOLD\nhttps://www.reddit.com/r/imagus/comments/fjtjio/where_can_i_get_the_default_url_string_for_the/\n\nПРИМЕРЫ / EXAMPLES:\nhttps://www.ebay.co.uk/b/Fishfinders-GPS/29723/bn_10198555?LH_Auction=1&rt=nc\nhttps://www.ebay.co.uk/b/Samsung-Laptops-Netbooks/175672/bn_6385453\nhttps://www.ebay.co.uk/p/28044271993?iid=165595634146\nhttps://www.ebay.com/sch/i.html?_from=R40&_trksid=p2499334.m570.l1313&_nkw=sports+cars&_sacat=6001\nhttps://www.ebay.com/itm/AMD-Ryzen-Threadripper-3990X-Processor-4-3-GHz-64-Core-Socket-sTRX4/223937363515?epid=4036368896&hash=item3423b4fe3b:g:4qkAAOSwzCFeYRaa"}}
```