Python urllib.splittag() Examples

The following are code examples for showing how to use urllib.splittag(). They are extracted from open source Python projects. You can vote up the examples you like or vote down the ones you don't like. You can also save this page to your account.

Example 1
Project: python-   Author: secondtonone1   File: py26compat.py    (license) View Source Project 5 votes vote down vote up
def strip_fragment(url):
    """
    In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
    later was patched to disregard the fragment when making URL requests.
    Do the same for Python 2.6 and earlier.
    """
    url, fragment = splittag(url)
    return url 
Example 2
Project: my-first-blog   Author: AnkurBegining   File: py26compat.py    (license) View Source Project 5 votes vote down vote up
def strip_fragment(url):
    """
    In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
    later was patched to disregard the fragment when making URL requests.
    Do the same for Python 2.6 and earlier.
    """
    url, fragment = splittag(url)
    return url 
Example 3
Project: swjtu-pyscraper   Author: Desgard   File: py26compat.py    (MIT License) View Source Project 5 votes vote down vote up
def strip_fragment(url):
    """
    In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
    later was patched to disregard the fragment when making URL requests.
    Do the same for Python 2.6 and earlier.
    """
    url, fragment = splittag(url)
    return url 
Example 4
Project: noc-orchestrator   Author: DirceuSilvaLabs   File: py26compat.py    (MIT License) View Source Project 5 votes vote down vote up
def strip_fragment(url):
    """
    In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
    later was patched to disregard the fragment when making URL requests.
    Do the same for Python 2.6 and earlier.
    """
    url, fragment = splittag(url)
    return url 
Example 5
Project: jira_worklog_scanner   Author: pgarneau   File: py26compat.py    (license) View Source Project 5 votes vote down vote up
def strip_fragment(url):
    """
    In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
    later was patched to disregard the fragment when making URL requests.
    Do the same for Python 2.6 and earlier.
    """
    url, fragment = splittag(url)
    return url 
Example 6
Project: zanph   Author: zanph   File: py26compat.py    (license) View Source Project 5 votes vote down vote up
def strip_fragment(url):
	"""
	In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
	later was patched to disregard the fragment when making URL requests.
	Do the same for Python 2.6 and earlier.
	"""
	url, fragment = splittag(url)
	return url 
Example 7
Project: Sci-Finder   Author: snverse   File: py26compat.py    (license) View Source Project 5 votes vote down vote up
def strip_fragment(url):
    """
    In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
    later was patched to disregard the fragment when making URL requests.
    Do the same for Python 2.6 and earlier.
    """
    url, fragment = splittag(url)
    return url 
Example 8
Project: Sci-Finder   Author: snverse   File: py26compat.py    (license) View Source Project 5 votes vote down vote up
def strip_fragment(url):
    """
    In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
    later was patched to disregard the fragment when making URL requests.
    Do the same for Python 2.6 and earlier.
    """
    url, fragment = splittag(url)
    return url 
Example 9
Project: ascii-art-py   Author: blinglnav   File: py26compat.py    (license) View Source Project 5 votes vote down vote up
def strip_fragment(url):
    """
    In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
    later was patched to disregard the fragment when making URL requests.
    Do the same for Python 2.6 and earlier.
    """
    url, fragment = splittag(url)
    return url 
Example 10
Project: ivaochdoc   Author: ivaoch   File: py26compat.py    (license) View Source Project 5 votes vote down vote up
def strip_fragment(url):
    """
    In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
    later was patched to disregard the fragment when making URL requests.
    Do the same for Python 2.6 and earlier.
    """
    url, fragment = splittag(url)
    return url 
Example 11
Project: aws-cfn-plex   Author: lordmuffin   File: py26compat.py    (license) View Source Project 5 votes vote down vote up
def strip_fragment(url):
    """
    In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
    later was patched to disregard the fragment when making URL requests.
    Do the same for Python 2.6 and earlier.
    """
    url, fragment = splittag(url)
    return url 
Example 12
Project: RPoint   Author: george17-meet   File: py26compat.py    (license) View Source Project 5 votes vote down vote up
def strip_fragment(url):
    """
    In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
    later was patched to disregard the fragment when making URL requests.
    Do the same for Python 2.6 and earlier.
    """
    url, fragment = splittag(url)
    return url 
Example 13
Project: AshsSDK   Author: thehappydinoa   File: py26compat.py    (license) View Source Project 5 votes vote down vote up
def strip_fragment(url):
    """
    In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
    later was patched to disregard the fragment when making URL requests.
    Do the same for Python 2.6 and earlier.
    """
    url, fragment = splittag(url)
    return url 
Example 14
Project: habilitacion   Author: GabrielBD   File: py26compat.py    (license) View Source Project 5 votes vote down vote up
def strip_fragment(url):
    """
    In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
    later was patched to disregard the fragment when making URL requests.
    Do the same for Python 2.6 and earlier.
    """
    url, fragment = splittag(url)
    return url 
Example 15
Project: flickr_downloader   Author: Denisolt   File: py26compat.py    (license) View Source Project 5 votes vote down vote up
def strip_fragment(url):
    """
    In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
    later was patched to disregard the fragment when making URL requests.
    Do the same for Python 2.6 and earlier.
    """
    url, fragment = splittag(url)
    return url 
Example 16
Project: threatdetectionservice   Author: flyballlabs   File: py26compat.py    (license) View Source Project 5 votes vote down vote up
def strip_fragment(url):
    """
    In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
    later was patched to disregard the fragment when making URL requests.
    Do the same for Python 2.6 and earlier.
    """
    url, fragment = splittag(url)
    return url 
Example 17
Project: oa_qian   Author: sunqb   File: py26compat.py    (license) View Source Project 5 votes vote down vote up
def strip_fragment(url):
    """
    In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
    later was patched to disregard the fragment when making URL requests.
    Do the same for Python 2.6 and earlier.
    """
    url, fragment = splittag(url)
    return url 
Example 18
Project: RealtimePythonChat   Author: quangtqag   File: py26compat.py    (license) View Source Project 5 votes vote down vote up
def strip_fragment(url):
    """
    In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
    later was patched to disregard the fragment when making URL requests.
    Do the same for Python 2.6 and earlier.
    """
    url, fragment = splittag(url)
    return url 
Example 19
Project: Indushell   Author: SecarmaLabs   File: py26compat.py    (license) View Source Project 5 votes vote down vote up
def strip_fragment(url):
    """
    In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
    later was patched to disregard the fragment when making URL requests.
    Do the same for Python 2.6 and earlier.
    """
    url, fragment = splittag(url)
    return url 
Example 20
Project: SHAREOpenRefineWkshop   Author: cmh2166   File: py26compat.py    (license) View Source Project 5 votes vote down vote up
def strip_fragment(url):
    """
    In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
    later was patched to disregard the fragment when making URL requests.
    Do the same for Python 2.6 and earlier.
    """
    url, fragment = splittag(url)
    return url 
Example 21
Project: Liljimbo-Chatbot   Author: chrisjim316   File: py26compat.py    (license) View Source Project 5 votes vote down vote up
def strip_fragment(url):
    """
    In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
    later was patched to disregard the fragment when making URL requests.
    Do the same for Python 2.6 and earlier.
    """
    url, fragment = splittag(url)
    return url 
Example 22
Project: leetcode   Author: thomasyimgit   File: py26compat.py    (license) View Source Project 5 votes vote down vote up
def strip_fragment(url):
    """
    In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
    later was patched to disregard the fragment when making URL requests.
    Do the same for Python 2.6 and earlier.
    """
    url, fragment = splittag(url)
    return url 
Example 23
Project: flask_system   Author: prashasy   File: py26compat.py    (license) View Source Project 5 votes vote down vote up
def strip_fragment(url):
    """
    In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
    later was patched to disregard the fragment when making URL requests.
    Do the same for Python 2.6 and earlier.
    """
    url, fragment = splittag(url)
    return url 
Example 24
Project: news-for-good   Author: thecodinghub   File: py26compat.py    (license) View Source Project 5 votes vote down vote up
def strip_fragment(url):
    """
    In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
    later was patched to disregard the fragment when making URL requests.
    Do the same for Python 2.6 and earlier.
    """
    url, fragment = splittag(url)
    return url 
Example 25
Project: CaScale   Author: Thatsillogical   File: py26compat.py    (license) View Source Project 5 votes vote down vote up
def strip_fragment(url):
    """
    In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
    later was patched to disregard the fragment when making URL requests.
    Do the same for Python 2.6 and earlier.
    """
    url, fragment = splittag(url)
    return url 
Example 26
Project: ShelbySearch   Author: Agentscreech   File: py26compat.py    (license) View Source Project 5 votes vote down vote up
def strip_fragment(url):
    """
    In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
    later was patched to disregard the fragment when making URL requests.
    Do the same for Python 2.6 and earlier.
    """
    url, fragment = splittag(url)
    return url 
Example 27
Project: where2live   Author: fbessez   File: py26compat.py    (license) View Source Project 5 votes vote down vote up
def strip_fragment(url):
    """
    In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
    later was patched to disregard the fragment when making URL requests.
    Do the same for Python 2.6 and earlier.
    """
    url, fragment = splittag(url)
    return url 
Example 28
Project: pyetje   Author: rorlika   File: py26compat.py    (license) View Source Project 5 votes vote down vote up
def strip_fragment(url):
    """
    In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
    later was patched to disregard the fragment when making URL requests.
    Do the same for Python 2.6 and earlier.
    """
    url, fragment = splittag(url)
    return url 
Example 29
Project: respeaker_virtualenv   Author: respeaker   File: py26compat.py    (license) View Source Project 5 votes vote down vote up
def strip_fragment(url):
    """
    In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
    later was patched to disregard the fragment when making URL requests.
    Do the same for Python 2.6 and earlier.
    """
    url, fragment = splittag(url)
    return url 
Example 30
Project: Tencent_Cartoon_Download   Author: Fretice   File: py26compat.py    (license) View Source Project 5 votes vote down vote up
def strip_fragment(url):
    """
    In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
    later was patched to disregard the fragment when making URL requests.
    Do the same for Python 2.6 and earlier.
    """
    url, fragment = splittag(url)
    return url 
Example 31
Project: Problematica-public   Author: TechMaz   File: py26compat.py    (license) View Source Project 5 votes vote down vote up
def strip_fragment(url):
    """
    In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
    later was patched to disregard the fragment when making URL requests.
    Do the same for Python 2.6 and earlier.
    """
    url, fragment = splittag(url)
    return url 
Example 32
Project: bawk   Author: jttwnsnd   File: py26compat.py    (license) View Source Project 5 votes vote down vote up
def strip_fragment(url):
    """
    In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
    later was patched to disregard the fragment when making URL requests.
    Do the same for Python 2.6 and earlier.
    """
    url, fragment = splittag(url)
    return url 
Example 33
Project: infinite-lorem-ipsum   Author: patjm1992   File: py26compat.py    (license) View Source Project 5 votes vote down vote up
def strip_fragment(url):
    """
    In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
    later was patched to disregard the fragment when making URL requests.
    Do the same for Python 2.6 and earlier.
    """
    url, fragment = splittag(url)
    return url 
Example 34
Project: coolrelation   Author: mrtial   File: py26compat.py    (license) View Source Project 5 votes vote down vote up
def strip_fragment(url):
    """
    In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
    later was patched to disregard the fragment when making URL requests.
    Do the same for Python 2.6 and earlier.
    """
    url, fragment = splittag(url)
    return url 
Example 35
Project: oil   Author: oilshell   File: test_urllib.py    (license) View Source Project 5 votes vote down vote up
def test_splittag(self):
        splittag = urllib.splittag
        self.assertEqual(splittag('http://example.com?foo=bar#baz'),
                         ('http://example.com?foo=bar', 'baz'))
        self.assertEqual(splittag('http://example.com?foo=bar#'),
                         ('http://example.com?foo=bar', ''))
        self.assertEqual(splittag('#baz'), ('', 'baz'))
        self.assertEqual(splittag('http://example.com?foo=bar'),
                         ('http://example.com?foo=bar', None))
        self.assertEqual(splittag('http://example.com?foo=bar#baz#boo'),
                         ('http://example.com?foo=bar#baz', 'boo')) 
Example 36
Project: python2-tracer   Author: extremecoders-re   File: test_urllib.py    (license) View Source Project 5 votes vote down vote up
def test_splittag(self):
        splittag = urllib.splittag
        self.assertEqual(splittag('http://example.com?foo=bar#baz'),
                         ('http://example.com?foo=bar', 'baz'))
        self.assertEqual(splittag('http://example.com?foo=bar#'),
                         ('http://example.com?foo=bar', ''))
        self.assertEqual(splittag('#baz'), ('', 'baz'))
        self.assertEqual(splittag('http://example.com?foo=bar'),
                         ('http://example.com?foo=bar', None))
        self.assertEqual(splittag('http://example.com?foo=bar#baz#boo'),
                         ('http://example.com?foo=bar#baz', 'boo')) 
Example 37
Project: fieldsight-kobocat   Author: awemulya   File: py26compat.py    (license) View Source Project 5 votes vote down vote up
def strip_fragment(url):
    """
    In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
    later was patched to disregard the fragment when making URL requests.
    Do the same for Python 2.6 and earlier.
    """
    url, fragment = splittag(url)
    return url 
Example 38
Project: python-group-proj   Author: Sharcee   File: py26compat.py    (license) View Source Project 5 votes vote down vote up
def strip_fragment(url):
    """
    In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
    later was patched to disregard the fragment when making URL requests.
    Do the same for Python 2.6 and earlier.
    """
    url, fragment = splittag(url)
    return url 
Example 39
Project: covar_me_app   Author: CovarMe   File: py26compat.py    (license) View Source Project 5 votes vote down vote up
def strip_fragment(url):
    """
    In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
    later was patched to disregard the fragment when making URL requests.
    Do the same for Python 2.6 and earlier.
    """
    url, fragment = splittag(url)
    return url 
Example 40
Project: wttd-dojo   Author: diegosorrilha   File: py26compat.py    (license) View Source Project 5 votes vote down vote up
def strip_fragment(url):
    """
    In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
    later was patched to disregard the fragment when making URL requests.
    Do the same for Python 2.6 and earlier.
    """
    url, fragment = splittag(url)
    return url 
Example 41
Project: wttd-dojo   Author: diegosorrilha   File: py26compat.py    (license) View Source Project 5 votes vote down vote up
def strip_fragment(url):
    """
    In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
    later was patched to disregard the fragment when making URL requests.
    Do the same for Python 2.6 and earlier.
    """
    url, fragment = splittag(url)
    return url 
Example 42
Project: python-beginner-tutorial   Author: mak1323   File: py26compat.py    (license) View Source Project 5 votes vote down vote up
def strip_fragment(url):
    """
    In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
    later was patched to disregard the fragment when making URL requests.
    Do the same for Python 2.6 and earlier.
    """
    url, fragment = splittag(url)
    return url 
Example 43
Project: WebAct   Author: CreatCodeBuild   File: py26compat.py    (license) View Source Project 5 votes vote down vote up
def strip_fragment(url):
    """
    In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
    later was patched to disregard the fragment when making URL requests.
    Do the same for Python 2.6 and earlier.
    """
    url, fragment = splittag(url)
    return url 
Example 44
Project: PornGuys   Author: followloda   File: py26compat.py    (license) View Source Project 5 votes vote down vote up
def strip_fragment(url):
    """
    In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
    later was patched to disregard the fragment when making URL requests.
    Do the same for Python 2.6 and earlier.
    """
    url, fragment = splittag(url)
    return url 
Example 45
Project: infiblog   Author: RajuKoushik   File: py26compat.py    (license) View Source Project 5 votes vote down vote up
def strip_fragment(url):
    """
    In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
    later was patched to disregard the fragment when making URL requests.
    Do the same for Python 2.6 and earlier.
    """
    url, fragment = splittag(url)
    return url 
Example 46
Project: python-on   Author: hemangsk   File: py26compat.py    (license) View Source Project 5 votes vote down vote up
def strip_fragment(url):
    """
    In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
    later was patched to disregard the fragment when making URL requests.
    Do the same for Python 2.6 and earlier.
    """
    url, fragment = splittag(url)
    return url 
Example 47
Project: python-on   Author: hemangsk   File: py26compat.py    (license) View Source Project 5 votes vote down vote up
def strip_fragment(url):
    """
    In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
    later was patched to disregard the fragment when making URL requests.
    Do the same for Python 2.6 and earlier.
    """
    url, fragment = splittag(url)
    return url 
Example 48
Project: python-on   Author: hemangsk   File: py26compat.py    (license) View Source Project 5 votes vote down vote up
def strip_fragment(url):
    """
    In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
    later was patched to disregard the fragment when making URL requests.
    Do the same for Python 2.6 and earlier.
    """
    url, fragment = splittag(url)
    return url 
Example 49
Project: bang_pivotal   Author: thealanberman   File: py26compat.py    (license) View Source Project 5 votes vote down vote up
def strip_fragment(url):
    """
    In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
    later was patched to disregard the fragment when making URL requests.
    Do the same for Python 2.6 and earlier.
    """
    url, fragment = splittag(url)
    return url 
Example 50
Project: remoteControlPPT   Author: htwenning   File: py26compat.py    (license) View Source Project 5 votes vote down vote up
def strip_fragment(url):
    """
    In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and
    later was patched to disregard the fragment when making URL requests.
    Do the same for Python 2.6 and earlier.
    """
    url, fragment = splittag(url)
    return url