User Tools

Site Tools

Translations of this page:

Sidebar

Documentation index

  • New Style Rotation
import_sets

Import Sets

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 import galleries from virtually any source with any options including Custom Galleries, additional thumbs and so on.

How it works: Rotation - Import Sets, click “Add New”. It opens the Import form with only few exceptions: input field for feed url (RSS, dump, XML), period of regrab, type of grab and delimiter. So type url to your gallery dump for example, click test, select what you want to import from this dump, select options as with regular import and click save. Script will import data from this dump every X hours.

Hints

  • Sometimes there's no direct URL to thumb in RSS and it looks like “some text <img src=….>”. Select “Parse Thumb”, not “Thumb” in such cases.
  • Delimiter - a division of the fields, it usually '|' for dumps, for RSS 'item' or 'video'
  • Description (Strip tags) use it if RSS have something like <a href='…'> Some Description </a> while you need only Some Description.

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.

Import Sets Type Deletion и Hamster

This is just an example based on xhamster, but it can be used with any other data sourse.

Let's say you import embedded videos from xhamster, to do so you added 'Import Set' like

http://partners.xhamster.com/2export.php?ch=!&cnt=4&tmb=4&tcnt=10&tl=on&ord=1&url=off&em=1&ttl=on&chs=on&sz=on&dlm=|
format #EMBED|#THUMB|#TITLE|#CHANNEL|#DURATION|

It it fine and works good.

But you might get into a trouble later, if a video will be deleted. xhamster provides a list of deleted videos as a set of urls, but when you imported videos you didn't import URL (#EMBED|#THUMB|#TITLE|#CHANNEL|#DURATION|) What to do: just add URL to the Import Set, for example http://partners.xhamster.com/2export.php?ch=!&cnt=4&tmb=4&tcnt=10&tl=on&ord=1&url=on&em=1&ttl=on&chs=on&sz=on&dlm=| ie now it looks like #EMBED|#THUMB|#URL**|#TITLE|#CHANNEL|#DURATION|

And now you can use Deletion RSS provided from xhamster, and add it as Import Set :: type = deletion. The script will automatically delete videos from this RSS.

import_sets.txt · Last modified: 2015/06/10 15:10 by admin