import_sets
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| import_sets [2015/06/10 15:08] – admin | import_sets [2026/03/21 10:11] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Import Sets ====== | ====== Import Sets ====== | ||
| + | Import Sets let you automatically pull galleries from any source at regular intervals and apply the same actions you'd use for manual imports (custom galleries, multi-category assignment, thumbnail generation, etc.). | ||
| - | Various sponsors provide URLs in various formats: RSS (and some sponsors use nonstandard fields), XML, dump. Before update 47 you could add only standard RSS feed and It was inconvenient for automatic feeding of you site. Import Set introduced for take care of this. With Import Sets you can automatically | + | To set up an import |
| - | How it works: | + | 1. Go to Rotation |
| + | 2. Enter the URL of your data source | ||
| + | 3. Set the re-grab interval (24 = every 24 hours) | ||
| + | 4. Specify the delimiter | ||
| + | 5. Click Test—the script analyzes the URL and identifies fields | ||
| + | 6. For any unidentified fields, skip them or manually | ||
| + | 7. Configure | ||
| + | 8. Click Save | ||
| - | ** Hints ** | + | Done. The import runs automatically on schedule. |
| - | * Sometimes there' | + | ===== Tips ===== |
| - | * Delimiter - a division of the fields, it usually ' | + | |
| - | * Description (Strip tags) use it if RSS have something like <a href=' | + | |
| + | - **RSS thumbnails: | ||
| - | **Note:** there are 2 types of import sets: Add and Delete. So urls found in Add type - will be added to DB, in type = delele - will be deleted from DB. | + | - **Delimiters:** The delimiter separates fields in your data source. In dumps, it's usually | (pipe). In RSS feeds, items are typically separated by `< |
| - | ===== Hints ===== | ||
| - | * В РСС часто тумба идет не как прямой урл до тумбы, а как таг <img src=....>. Для этого поля надо выбирать не Thumb, а Parse Thumb. | + | ===== Deletion Feed ===== |
| - | * Delimiter - это разделение полей, в дампах это обычно | , в RSS обычно item, но бывает еще video. Разобраться с этим несложно: | + | |
| - | + | Import Sets come in two types: **Add** (imports new galleries) and **Deletion** (removes galleries from your database). | |
| - | Обратите внимание, | + | |
| + | Deletion feeds are efficient for automatic gallery removal. Instead of running [[Gallery Checker]] to test every link (which loads both your server and the sponsor' | ||
| - | ===== Большие импортсеты ===== | + | The script supports partial URL matching. For example, if your URL is http:// |
| - | Смотрю один сайт и вижу, что rot.php работает как-то дольше, | + | **Aggregating deletion feeds across multiple sites** |
| - | * 2011-11-28 13:19 ImportSet....: | + | If you run multiple sites that share gallery URLs, you can aggregate deletion feeds in one location. For example: |
| - | * 2011-11-28 13:20 ImportSet....: Added: , Dupes: 20000 | + | |
| - | * 2011-11-28 13:21 ImportSet....: | + | |
| - | и так далее, те в импортсетах много РСС\дампов, | + | - You have 10 deletion feed sources plus your own custom galleries |
| + | - These galleries are used across 100 other sites | ||
| + | - Instead of adding the 10 feeds to each of the 100 sites, add them once to a central " | ||
| + | On the base site, set the import type to "mark inactive" | ||
| - | Думаю, что смысл ошибки понятен, | + | < |
| - | В апедйте 49 было добавлено ограничение на размер импортсета для защиты пользователей от самих себя :) | + | <thumb num=1-100 order=date gallery_status=inactive> |
| + | gallery URL | ||
| + | </ | ||
| - | ===== Import Sets Type Deletion и Hamster (как пример, | + | </ |
| + | Access the list via http:// | ||
| - | В принципе это относится не только к Хамстеру, | + | **Note for master-slave networks:** If you run master-slave sites sharing one database, you only need to add the deletion feed to one site—all slaves will automatically see the deletions. |
| + | ===== Large import sets ===== | ||
| - | Вводная: Хамстер дает ембеды, вы решили сделать на эмбедах сайт. Дабы было постоянное автоматическое пополнение сиджа настроили Import Set и добавили туда дамп Хамстера | + | Normally, import sets check a URL on a schedule (once per day, once every X hours) and add newly available galleries. This works well when sources add 10-20 to 1000 URLs daily. |
| + | |||
| + | For very large one-time imports (1 million+ URLs), add the file as an import set as usual. The script downloads and processes all URLs until the entire file is imported. Once complete, the import set automatically pauses—it won't check for daily updates since the source was a one-time bulk file. | ||
| + | |||
| + | ===== Deletion feeds with embed imports (example: xHamster) ===== | ||
| + | |||
| + | This applies to any video source, but xHamster is a common example. | ||
| + | |||
| + | **The scenario: | ||
| + | |||
| + | You set up an import set to add xHamster embeds: | ||
| http:// | http:// | ||
| - | который выдает в формате # | ||
| - | Как бы этого достаточно, | + | This provides: # |
| - | Вопрос возникнет позже - когда надо будет добавить автоматическое удаление галер удаленных на хамстере. | + | Everything works initially. Later, you want to automatically remove galleries deleted on xHamster. xHamster provides a deletion list, but your import set has no URL field (# |
| - | хамстер выдает список урлов удаленных видео, **но в нашем то импорт сете урла нет | + | |
| + | **The solution:** | ||
| - | **Что делать:** урл дампа хамстера надо поменять так, что б там появился урл гали, примерно так | + | Modify the import URL to include the gallery URL: |
| http:// | http:// | ||
| - | тогда дамп будет выдавать урл гали # | ||
| - | те добавлено #URL | ||
| + | Now it provides: # | ||
| + | |||
| + | SmartCJ stores each gallery with its source URL and can automatically match and delete videos when they appear in the deletion feed. This also applies if you use [[Gallery Checker]] instead. | ||
| + | |||
| + | **Background: | ||
| + | |||
| + | Before deletion feeds, [[Tube Import]] let you auto-import videos, but tubes delete content regularly. [[Gallery Checker]] was created to detect deletions by keyword matching (for example, searching for "Video deleted" | ||
| + | |||
| + | For both [[Gallery Checker]] and deletion imports, you need the original gallery URL. Deletion feeds are preferred over Gallery Checker when available. | ||
| - | Смарт будет добавлять гали в базу с пометкой source url = ... и соответственно сможет автоматически удалять у себя в базе удаленные видео хамстера. | + | **Option 2: Mismatch between import URL and deletion feed** |
| + | Sometimes the URLs in your import don't match the deletion feed. For example: | ||
| + | - You imported: http:// | ||
| + | - The tube changed URLs to: http:// | ||
| + | - The deletion feed provides only: 1234 | ||
| - | PS Это так же актуально если вы проверяете доступность галер с помощью [[Gallery Checker]]. | + | Store the deletion feed identifier in a custom field. For example, import as: url|custom_var1 (where custom_var1 = 1234) |
| - | Будет не лишним сделать небольшое отступление: | + | Then configure the Deletion import set to match by custom_var1 instead of the main URL field. |
| - | Однако с ростом баз стало ясно, что если в базе 500к урлов, то появляется некоторая проблема с проверкой такого кол-ва урлов, и как раз к этому моменту у продвинутых тубов начали появляться deletion rss - те рсс со списками удаленных урлов, и соответственно можно было не проверять все урлы с помощью [[Gallery Checker]], а сразу точечно удалять нужные урлы - для этого у импорт сета появился тип deletion. | + | **Important: |
| + | ===== Paginated import feeds ===== | ||
| - | Те и для [[Gallery Checker]] и для импорт сет deletion type - надо знать исходный урл. Если у туба\спонсора есть deletion rss - предпочтительнее юзать его. Если нет - [[Gallery Checker]]. | + | Some feeds limit results to 50 items per page and require you to manually increment the page parameter. Use the {PAGE} tag to automate this. The script starts with 1 on the first run and increments by 1 each subsequent run, walking through all pages. The import stops when the URL returns no results. |
| + | If you edit the import set, the page counter resets to 1. | ||
| - | ===== Import Sets - personal name ===== | + | ===== Custom names for import sets ===== |
| - | Для удобства пользования у каждого импортсета появилось опциональное имя. Можно его не вводить и список импортсетов будет выглядеть как раньше, а можно дать каждому импорсету персональное имя. | + | You can optionally assign a descriptive name to each import set. This makes it easier to identify them in the admin interface, though it's not required. |
import_sets.1433948911.txt.gz · Last modified: (external edit)
