Skip to content

Commit

Permalink
Fixed avito.ru
Browse files Browse the repository at this point in the history
  • Loading branch information
jabbahotep committed Feb 23, 2021
1 parent 2b4bd47 commit d249808
Show file tree
Hide file tree
Showing 4 changed files with 301 additions and 106 deletions.
2 changes: 1 addition & 1 deletion E-Commerce/avito.ru/config.json
@@ -1,6 +1,6 @@
{
"digger": {
"updated": "2020-12-22",
"updated": "2021-02-23",
"compile": false
},
"english": {
Expand Down
135 changes: 100 additions & 35 deletions E-Commerce/avito.ru/config_by_ad.yml
Expand Up @@ -190,49 +190,114 @@ do:
repeat: <%pr%>
do:
- find:
path: title
path: html
do:
- parse
- if:
match: (Доступ с вашего IP-адреса временно ограничен)|(Доступ временно заблокирован)
do:
- info: Proxy is banned, switching
- proxy_switch
- cookie_reset
- variable_set:
field: pr
value: "yes"
- find:
path: message
do:
- parse
- info: <%register%>
- variable_set:
field: pr
value: "no"
- find:
path: uri
do:
- variable_set:
field: pr
value: "no"
- parse:
filter:
- number\=([^?]+)
format: html
- if:
match: \d
match: '\&\#34\;\:'
do:
- parse
- normalize:
routine: URLDecode
- object_field_set:
object: item
field: phone
routine: json2xml
- to_block
- variable_clear: code
- find:
path: code
do:
- parse
- variable_set: code
- variable_get: code
- if:
match: 403
do:
- info: Proxy is banned, switching
- proxy_switch
- cookie_reset
- variable_set:
field: pr
value: "yes"
else:
- find:
path: message
do:
- parse
- info: <%register%>
- variable_set:
field: pr
value: "no"
- find:
path: uri
do:
- variable_set:
field: pr
value: "no"
- parse:
filter:
- number\=([^?]+)
- if:
match: \d
do:
- normalize:
routine: URLDecode
- object_field_set:
object: item
field: phone
else:
- parse
- if:
match: authenticate
do:
- info: You need to login to see this phone number
else:
- parse
- variable_clear: code
- find:
path: code
do:
- parse
- variable_set: code
- variable_get: code
- if:
match: authenticate
match: 403
do:
- info: You need to login to see this phone number
- info: Proxy is banned, switching
- proxy_switch
- cookie_reset
- variable_set:
field: pr
value: "yes"
else:
- find:
path: message
do:
- parse
- info: <%register%>
- variable_set:
field: pr
value: "no"
- find:
path: uri
do:
- variable_set:
field: pr
value: "no"
- parse:
filter:
- number\=([^?]+)
- if:
match: \d
do:
- normalize:
routine: URLDecode
- object_field_set:
object: item
field: phone
else:
- parse
- if:
match: authenticate
do:
- info: You need to login to see this phone number
- find:
path: item > time
do:
Expand Down

0 comments on commit d249808

Please sign in to comment.