Here you can find the source of getUserId(Element authorElement)
Parameter | Description |
---|---|
authorElement | a parameter |
private static String getUserId(Element authorElement)
//package com.java2s; //License from project: Open Source License import org.jsoup.nodes.Element; public class Main { /** The Constant USER_URL_START_INDEX. */ private static final int USER_URL_START_INDEX = 16; /** The Constant USER_URL_END_INDEX. */ private static final int USER_URL_END_INDEX = 28; /**/*from www.j av a 2 s.c o m*/ * * @param authorElement * @return Google citation user id */ private static String getUserId(Element authorElement) { String userIdUrL = authorElement.attr("href"); String userId = userIdUrL.substring(userIdUrL.indexOf("/citations?user=") + USER_URL_START_INDEX, userIdUrL.indexOf("/citations?user=") + USER_URL_END_INDEX); return userId; } }