mirror of
				https://github.com/commons-app/apps-android-commons.git
				synced 2025-10-31 06:43:56 +01:00 
			
		
		
		
	Add PageTitle class to canonicalize page names
This commit is contained in:
		
							parent
							
								
									691acbf983
								
							
						
					
					
						commit
						d241d36d66
					
				
					 12 changed files with 234 additions and 50 deletions
				
			
		|  | @ -9,7 +9,7 @@ import java.net.HttpURLConnection; | |||
| import java.net.URL; | ||||
| import java.util.Locale; | ||||
| 
 | ||||
| import fr.free.nrw.commons.CommonsApplication; | ||||
| import fr.free.nrw.commons.PageTitle; | ||||
| import fr.free.nrw.commons.concurrency.BackgroundPoolExceptionHandler; | ||||
| import fr.free.nrw.commons.concurrency.ThreadPoolExecutorService; | ||||
| import timber.log.Timber; | ||||
|  | @ -34,7 +34,8 @@ public class UploadCountClient { | |||
|             public void run() { | ||||
|                 URL url; | ||||
|                 try { | ||||
|                     url = new URL(String.format(Locale.ENGLISH, UPLOAD_COUNT_URL_TEMPLATE, userName)); | ||||
|                     url = new URL(String.format(Locale.ENGLISH, UPLOAD_COUNT_URL_TEMPLATE, | ||||
|                             new PageTitle(userName).getText())); | ||||
|                     HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection(); | ||||
|                     try { | ||||
|                         BufferedReader bufferedReader = new BufferedReader(new | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Yusuke Matsubara
						Yusuke Matsubara