Skip to content

Instantly share code, notes, and snippets.

View Ozerich's full-sized avatar

Vital Ozierski Ozerich

View GitHub Profile
<?php
require_once PARSERS_BASE_DIR . '/parsers/baseClasses/ozerich.php';
class ISP_budumamoy_ru extends ItemsSiteParser_Ozerich
{
protected $shopBaseUrl = "http://www.budumamoy.ru/";
public function loadItems ()
{
#ifndef HA_H
#define HA_H
#include "OziHttpClient.h"
#include <string>
#include <fstream>
#include <iostream>
#include <vector>
#include "DateTime.h"
#include <windows.h>
1. Лукашенко Александр Григорьевич, президент.
2. Невыглас Геннадий Николаевич, бывший глава Администрации президента.
3. Петкевич Наталья Владимировна, бывший первый заместитель главы Администрации президента.
4. Рубинов Анатолий Николаевич, заместитель главы Администрации президента по вопросам СМИ и идеологии.
5. Пролесковский Олег Витольдович, министр информации.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru">
<head>
<link rel="stylesheet" type="text/css" href="css/reset.css"/>
</head>
<body>
<div id="top-wrapper">
<div id="header">
<div id="logo">
function parse($url)
{
$text = get_page($url);
preg_match_all('#<li class=rg_li.+?>(.+?)</li>#si', $text, $pics);
$items = array();
foreach($pics[1] as $data)
{
preg_match('#=&amp;h=(\d+)&amp;w=(\d+)&amp;sz=(\d+)&amp#sui', $data, $info);
preg_match('#imgurl=(.+?)&amp;#sui', $data, $pic_url);
preg_match('#imgrefurl=(.+?)&amp;#sui', $data, $site_url);
import os
import re
import glob
class parser(object):
config_dir = 'D:/Parser/'
config_file = 'httpd.conf'
config_path = os.path.join(config_dir, config_file);
def is_installed(self):
<div id="blocks-wrapper">
<div id="blocks-container">
<div id="blocks-left"></div>
<div class="blocks">
<div id="news-block" class="block">
<div class="block-header">
<img src="images/column1.jpg" alt="" />
<h2 class="header">Новости</h2>
<a href="#">Все новости</a>
/* blocks */
#blocks-wrapper{
width: 100%;
clear: both;
height: 100px;
margin: 0 auto;
}
#blocks-container{
#include <cstdio>
#include <cstdlib>
int strlen(char *text)
{
int i;
for(i = 0; text[i] != '\0'; i++);
return i;
}
#include <cstdio>
#include <cstdlib>
int strlen(char *text)
{
int i;
for(i = 0; text[i] != '\0'; i++);
return i;
}