Compare commits
	
		
			2 Commits
		
	
	
		
			54aaa80f23
			...
			ac4b0ef47b
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| ac4b0ef47b | |||
| 879b33d385 | 
| @@ -2,7 +2,5 @@ scope: | |||||||
|   allow: [info, web, rutracker, prescene, stb, metal-archives, console] |   allow: [info, web, rutracker, prescene, stb, metal-archives, console] | ||||||
|   default: console |   default: console | ||||||
| mail: | mail: | ||||||
|   amok.space: |  | ||||||
|     dial-tls: mail.amok.space:993 |  | ||||||
|   kplus.net.ua: |   kplus.net.ua: | ||||||
|     dial-tls: s21.thehost.com.ua:993 |     dial-tls: s21.thehost.com.ua:993 | ||||||
| @@ -73,6 +73,6 @@ groups: | |||||||
|       - HiTE |       - HiTE | ||||||
|       - RPO |       - RPO | ||||||
|       - MEOWZiK |       - MEOWZiK | ||||||
|       # - STONERD |       - STONERD | ||||||
|       - TR |       - TR | ||||||
|       - W4GN3R |       - W4GN3R | ||||||
|   | |||||||
| @@ -1,9 +1,9 @@ | |||||||
| role: console | role: console | ||||||
| stb: | stb: | ||||||
|   endpoint: stb@amok.space |   endpoint: stb@kplus.net.ua | ||||||
|   #mailboxes: ["INBOX"] |   mailboxes: ["INBOX"] | ||||||
|   #mailboxes: ["INBOX", "Junk Mail", "Done"] |   #mailboxes: ["INBOX", "Junk Mail", "Done"] | ||||||
|   mailboxes: ["Junk Mail"] |   #mailboxes: ["Junk Mail"] | ||||||
|   #mailboxes: ["Done"] |   #mailboxes: ["Done"] | ||||||
|   search-criteria: ["Your Share The Brutality digest", "noreply@sharethebrutality.info"] |   search-criteria: ["Your Share The Brutality digest", "noreply@sharethebrutality.info"] | ||||||
|   move-processed-to-mailbox: |   move-processed-to-mailbox: | ||||||
|   | |||||||
| @@ -24,7 +24,7 @@ Commands: | |||||||
| 	-section	-s  Select section e.g.: rutracker, bandcamp etc. | 	-section	-s  Select section e.g.: rutracker, bandcamp etc. | ||||||
|  |  | ||||||
| The Go runtime version: %s | The Go runtime version: %s | ||||||
| Report bugs to https://git.amok.space/yevhen/resource-scraper/issues` | Report bugs to https://git.kplus.net.ua/yevhen/resource-scraper/issues` | ||||||
|  |  | ||||||
| const ( | const ( | ||||||
| 	version           = "0.1" | 	version           = "0.1" | ||||||
|   | |||||||
| @@ -68,8 +68,12 @@ func (s *EmailService) Login() { | |||||||
|  |  | ||||||
| 	err := s.client.Login(s.User, s.pass).Wait() | 	err := s.client.Login(s.User, s.pass).Wait() | ||||||
| 	if s.CheckErr("Login", err) { | 	if s.CheckErr("Login", err) { | ||||||
|  | 		fmt.Println("========================================") | ||||||
|  | 		fmt.Println(err.Error()) | ||||||
|  | 		fmt.Println("========================================") | ||||||
| 		return | 		return | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	s.success(s.User + " logged") | 	s.success(s.User + " logged") | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -117,6 +121,7 @@ func (s *EmailService) ListMessages(mailboxes []string, criteria *imap.SearchCri | |||||||
| 		} | 		} | ||||||
|  |  | ||||||
| 		messages, err := s.client.Fetch(seqSet, fetchOptions).Collect() | 		messages, err := s.client.Fetch(seqSet, fetchOptions).Collect() | ||||||
|  |  | ||||||
| 		if s.CheckErr("Fetch", err) { | 		if s.CheckErr("Fetch", err) { | ||||||
| 			continue | 			continue | ||||||
| 		} | 		} | ||||||
|   | |||||||
| @@ -44,7 +44,7 @@ func (s *Prescene) GetPage(pageNumbers []string) ([]model.ExternalSources, error | |||||||
| 				endpoint += fmt.Sprintf(viper.GetString(constant.CfgKeyEndpointNext), t) | 				endpoint += fmt.Sprintf(viper.GetString(constant.CfgKeyEndpointNext), t) | ||||||
| 			} | 			} | ||||||
|  |  | ||||||
| 			//doc, err := parser.HTMLSourceFromURL("https://mdb.amok.space/$/scnlog.html") | 			//doc, err := parser.HTMLSourceFromURL("https://mdb.kplus.net.ua	/$/scnlog.html") | ||||||
| 			if result, err := parseUrl(endpoint, s.db); err == nil { | 			if result, err := parseUrl(endpoint, s.db); err == nil { | ||||||
| 				entries = append(entries, result...) | 				entries = append(entries, result...) | ||||||
| 			} else { | 			} else { | ||||||
|   | |||||||
| @@ -144,7 +144,7 @@ func (s *ShareTheBrutality) Processing(sender map[string]string) []model.Externa | |||||||
| 					entries = append(entries, es) | 					entries = append(entries, es) | ||||||
| 				} | 				} | ||||||
|  |  | ||||||
| 				fmt.Println(entries) | 				//fmt.Println(entries) | ||||||
| 				//os.Exit(0) | 				//os.Exit(0) | ||||||
|  |  | ||||||
| 				result, status := _table.BatchInsertOnDuplicate(entries, s.db, columns) | 				result, status := _table.BatchInsertOnDuplicate(entries, s.db, columns) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user