| Á¹Á¹ È帧 ½¬¿î URL °Ç¹° ¹× Á¶ÀÛÀ»À§ÇÑ ºÒº¯ URL Ŭ·¡½º |
Áö±Ý ´Ù¿î·Îµå |
Á¹Á¹ È帧 ¼øÀ§ ¹× ¿ä¾à
- °Ô½ÃÀÚ À̸§:
- David Winterbottom
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- https://github.com/tangentlabs/
Á¹Á¹ È帧 ű×
Á¹Á¹ È帧 ¼³¸í
PURLÀº ½É¹® ¹× Á¶ÀÛÀ»À§ÇÑ ±ú²ýÇÑ API¸¦ °®Ãá °£´ÜÇÏ°í ºÒ¾ÈÁ¤ÇÑ URL Ŭ·¡½ºÀÔ´Ï´Ù. PYPI (¾ÈÁ¤) : PIP ¼³Ä¡ PURLFROM GitHub (ºÒ¾ÈÁ¤) : PIP ¼³Ä¡ git + git : //github.com/codeinthehole/purl.git#egg = purluseconstruct : URL °¡Á® ¿À±â¿¡¼ URL °¡Á® ¿À±â = URL (Scheme = 'https', host = 'www.google.com', path = '/ search', query = 'q = testing) # factoryu = URLÀ» »ç¿ëÇϽʽÿÀ. _String ( 'https://www.google.com/search?q=testing') # Combineu = url.from_string ( 'http://www.google.com') .Path ( '°Ë»ö') \ .query_param ( 'Q', 'Testing') URL °´Ã¼°¡ º¯°æµÇÁö ¾Ê½À´Ï´Ù. ¸ðµç ¹Â Å×ÀÌÅÍ ¸Þ¼µå´Â »õ ÀνºÅϽº¸¦ ¹ÝȯÇÕ´Ï´Ù. interrogate : u.scheme () # 'https'u.host () #'www.google.com'u.domain () # 'www.google.com'- hostu.port () # none - ¸í½Ã ÀûÀ¸·Î setu.path () # '/search'u.query () #'q = testing'u.Fragment () # 'q = testing'u.fragment () #'q = testing'u.Fragment () # 'q = testing'u.fragment () #' # 'q = testing'u.path_segment (0) #'search'u.path_segments ( '°Ë»ö',) u.query_param ( 'q') # 'testing'u.query_param ('q ', as_list = true) # u.query_param ( 'lang', default = 'gb') # ' gb'u.query_params () # { 'Q': 'Testing'} u.subdomains () # u.subdomain (0) # 'www'note °¢ Á¢±Ù ÀÚ ¸Þ¼Òµå´Â jQuery API¿Í ºñ½ÁÇÑ ¹ÂÆ® ÅÍ ¸Þ¼Òµå·Î ³Ê¹« °úºÎÇϵ˴ϴÙ. ¿¹ : u = url.from_string ( 'https://github.com/codeIthole') # accessu.path_segment (0) # ¹Ýȯ 'ÄÚµå codeinthele'# µ¹¿¬º¯ÀÌ (»õ ÀνºÅϽº »ý¼º) new_url = u.path_segment (0, 'tangentlabs) ') # ´Ù¸¥ °ÍµéÀÇ »õ·Î¿î URL objectcoupleÀ» ¹ÝȯÇÕ´Ï´Ù. - URL Ŭ·¡½º´Â ºÒº¯À̹ǷΠ»çÀü¿¡¼ Å°·Î »ç¿ëµÉ ¼ö ÀÖÀ¸¹Ç·Î ¼±ÅÃÇÒ ¼ö ÀÖ°í º¹¿ø ÇÒ ¼ö ÀÖ½À´Ï´Ù.
Á¹Á¹ È帧 °ü·Ã ¼ÒÇÁÆ®¿þ¾î