Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
en:grabbing_of_the_court_site_using_python [2018/05/25 07:26]
2SRTVF
en:grabbing_of_the_court_site_using_python [2018/05/25 13:12]
127.0.0.1 external edit
Line 1: Line 1:
  
 ==== Grabbing with Python and Grab framework ==== ==== Grabbing with Python and Grab framework ====
 +\\ 
 The program uses one of the sites of the Russian court site as a source of data, in code, at https://​vytegorsky--vld.sudrf.ru.\\ ​ The program uses one of the sites of the Russian court site as a source of data, in code, at https://​vytegorsky--vld.sudrf.ru.\\ ​
 It searches for the specified words in the list of assigned cases from the current day to the appointed day and sends the search result to the e-mail. It searches for the specified words in the list of assigned cases from the current day to the appointed day and sends the search result to the e-mail.
  
-In the search_list ​array, the words that will be searched are assigned.\\ ​+In the search_list ​list, the words that will be searched are assigned.\\ ​
 The number of days viewed, starting from the current, in which the search will occur is set DaysFuture variable.\\ ​ The number of days viewed, starting from the current, in which the search will occur is set DaysFuture variable.\\ ​
 The settings for the SMTP server and the sender and recipient mailboxes are also set. The process of running the logged code in the example_app.log file. The settings for the SMTP server and the sender and recipient mailboxes are also set. The process of running the logged code in the example_app.log file.
  
 +\\ 
 <file python SearchOnTheWebsiteExample-en.py>​ <file python SearchOnTheWebsiteExample-en.py>​
  
Line 39: Line 40:
  
 # column [0]: search words as string # column [0]: search words as string
-# column [1]: an array of page dates on which the search was successful+# column [1]: list of page dates on which the search was successful
  
 search_list = [ \ search_list = [ \
Line 92: Line 93:
             continue             continue
     ​     ​
-    # moving on the array of search words (column [0]), +    # moving on the list of search words (column [0]), 
     #  when the word is successfully found in the text of the page,      #  when the word is successfully found in the text of the page, 
     #  we save the date of the page in the result column (column [1]),      #  we save the date of the page in the result column (column [1]), 
-    #  as an element of the array+    #  as an element of the list
     for row in search_list:​     for row in search_list:​
         if g.doc.text_search(row[0].encode('​cp1251'​),​ byte=True):         if g.doc.text_search(row[0].encode('​cp1251'​),​ byte=True):
  • en/grabbing_of_the_court_site_using_python.txt
  • Last modified: 2018/06/27 22:22
  • by 2SRTVF