mirror of https://gitlab.com/bashrc2/epicyon
				
				
				
			Change sequence
							parent
							
								
									1a6bc85d17
								
							
						
					
					
						commit
						a2c779acdf
					
				
							
								
								
									
										11
									
								
								person.py
								
								
								
								
							
							
						
						
									
										11
									
								
								person.py
								
								
								
								
							|  | @ -1950,13 +1950,19 @@ def set_featured_hashtags(actor_json: {}, hashtags: str) -> None: | ||||||
|     """sets featured hashtags |     """sets featured hashtags | ||||||
|     """ |     """ | ||||||
|     separator_str = ' ' |     separator_str = ' ' | ||||||
|     separators = (' ', ',') |     separators = (',', ' ') | ||||||
|     for separator_str in separators: |     for separator_str in separators: | ||||||
|         if separator_str in hashtags: |         if separator_str in hashtags: | ||||||
|             break |             break | ||||||
|     tag_list = hashtags.split(separator_str) |     tag_list = hashtags.split(separator_str) | ||||||
|     result = [] |     result = [] | ||||||
|     tags_used = [] |     tags_used = [] | ||||||
|  |     actor_id = actor_json['id'] | ||||||
|  |     actor_domain = actor_id.split('://')[1] | ||||||
|  |     if '/' in actor_domain: | ||||||
|  |         actor_domain = actor_domain.split('/')[0] | ||||||
|  |     actor_url = \ | ||||||
|  |         actor_id.split('://')[0] + '://' + actor_domain | ||||||
|     for tag_str in tag_list: |     for tag_str in tag_list: | ||||||
|         if not tag_str: |         if not tag_str: | ||||||
|             continue |             continue | ||||||
|  | @ -1964,8 +1970,7 @@ def set_featured_hashtags(actor_json: {}, hashtags: str) -> None: | ||||||
|             tag_str = '#' + tag_str |             tag_str = '#' + tag_str | ||||||
|         if tag_str in tags_used: |         if tag_str in tags_used: | ||||||
|             continue |             continue | ||||||
|         url = \ |         url = actor_url + '/tags/' + tag_str.replace('#', '') | ||||||
|             actor_json['id'] + '/tags/' + tag_str.replace('#', '') |  | ||||||
|         result.append({ |         result.append({ | ||||||
|             "name": tag_str, |             "name": tag_str, | ||||||
|             "type": "Hashtag", |             "type": "Hashtag", | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue