Skip to main content

SE::Yandex::Balaboba - Scraper for texts from Balaboba

SE::Yandex::Balaboba

Overview of the scraper

SE::Yandex::BalabobaSE::Yandex::Balaboba - text scraper from Balaboba.

The scraper retrieves texts from the service of the same name.

You can use automatic query multiplication, substitution of subqueries from files, iteration of alphanumeric combinations and lists to get the maximum possible number of results.

A-Parser functionality allows you to save the parsing settings for the SE::Yandex::Balaboba scraper for further use (presets), set up a parsing schedule and much more.

Results can be saved in the form and structure that you need, thanks to the built-in powerful templating engine Template Toolkit which allows you to apply additional logic to the results and output data in various formats, including JSON, SQL and CSV.

Collected data

  • Generated text
  • Style by which the text was generated
  • Link to the image

Capabilities

  • Scrape unique texts with the ability to choose the text style (parameter Style): Recipes (RU), Short stories (RU), Recipies (EN) and others
  • Selecting the style number which can be seen in the browser and scraping with the desired text style if it is not available in the style selection option (ID of custom style parameter)

Use cases

  • Mass collection of unique texts

Queries

Queries must be phrases from which the generation will begin, for example:

Once upon a time

Query substitutions

You can use built-in macros for automatic substitution of subqueries from files, for example, we want to add a list of other words to each query, we will specify several main queries:

Once upon a time
Fantasy
Tower defense

In the query format, we will specify a macro for substituting additional words from the file keywords.txt, this method allows you to increase the variability of queries many times over:

{subs:keywords} $query 

This macro will create as many additional queries as there are in the file for each original search query, which in total will give [number of original queries] x [number of queries in the Keywords file] = [total number of queries] as a result of the macro operation.

For example, if the file keywords.txt will contain:

free
online

As a result, the substitution macro will turn 3 main queries into 6:

free fantasy
online fantasy
free tower defense
online tower defense
free rpg
online rpg

Output results examples

A-Parser supports flexible results formatting thanks to the built-in templating engine Template Toolkit, which allows it to output results in an arbitrary form, as well as in a structured form, such as CSV or JSON

Default output

Result format:

$style: $text\n

Example result:

No style (RU): Once upon a time there were three little pigs, three brothers.
And each of them had a house.
They were very friendly pigs.
They helped each other in everything, and if something happened to one of them, the other brother would always come to the rescue.
One day it snowed heavily, and the brothers decided to hide from it in their houses.
But then the gray wolf came out from around the corner.
He was hungry and saw that there were no doors in the houses.
Then the wolf decided to go into the first house and eat the pig.
The wolf quickly opened the door and looked in.

Possible settings

ParameterDefault valueDescription
StyleRandom (All languages)Select text style
ID of custom styleSet style number for text generation
Repeat if Balaboba reports about errorRetry parsing if Balaboba showed an error message
Repeat if Balaboba reports about bad queryRetry parsing if Balaboba showed a message due to an incorrect query