Skip to content

Instantly share code, notes, and snippets.

View CodersArts's full-sized avatar
💭
Computer Science Assignment Portal.We offers programming assignment.

CodersArts CodersArts

💭
Computer Science Assignment Portal.We offers programming assignment.
View GitHub Profile
@CodersArts
CodersArts / BeautifulSoup.py
Created August 23, 2019 07:00
Install Beautiful Soup
pip install beautifulsoup4
@CodersArts
CodersArts / BeautifulSoup.py
Last active August 23, 2019 07:02
Install Beautiful Soup
#IN Linux
$ apt-get install python-bs4 (for Python 2)
$ apt-get install python3-bs4 (for Python 3)
@CodersArts
CodersArts / Request.py
Created August 23, 2019 07:04
Install request package - Using Beautiful Soupe
$ pip install requests
@CodersArts
CodersArts / BeautifulSoupScrap.py
Created August 23, 2019 07:08
Web Scraping Using BeautifulSoup
#CodersArts Assignment Help - Python
#If you need any programming or project Help contact at codersarts official website
from bs4 import BeautifulSoup
import requests
page_link = 'URL'
@CodersArts
CodersArts / ScrapeBySoup.py
Created August 23, 2019 07:10
Web Scraping Host way to Scrape content
soup.title
# <title>Returns title tags and the content between the tags</title>
soup.title.string
# u'Returns the content inside a title tag as a string'
soup.p
@CodersArts
CodersArts / bwindow.py
Created August 23, 2019 07:18
install beautifulsoup4 in window
pip install beautifulsoup4
@CodersArts
CodersArts / regexpression.py
Created August 26, 2019 15:15
Regular Expression 14 metacharacters
#14 metacharacters
\ : Used to drop the special meaning of character
[] : character class
^ : matches at beginning
$ : matches at end
. : matches any character(except newline)
? : matches zero or one occurrence
| : or
* : multiple number of occurrence
@CodersArts
CodersArts / unicodestring.py
Created August 26, 2019 15:19
Regular Expression Unicode string patterns
#codersarts
#unicode string patterns in regular expression
\d : Matches any decimal digit; this is equivalent to the class [0-9].
\D : Matches any non-digit character; this is equivalent to the class [^0-9]
\s : Matches any whitespace character; this is equivalent to the class [ \t\n\r\f\v].
\S : Matches any non-whitespace character; this is equivalent to the class [^ \t\n\r\f\v].
\w : Matches any alphanumeric character; this is equivalent to the class [a-zA-Z0-9_].
\W : Matches any non-alphanumeric character; this is equivalent to the class [^a-zA-Z0-9_].
@CodersArts
CodersArts / compile.py
Created August 26, 2019 15:21
compile regular expression
import re
pattern=re.compile('my')
result=pattern.findall('my name is naveen')
print result
result2=pattern.findall('Hi Hi This is codersarts')
print result2
Output
['my']
@CodersArts
CodersArts / split.py
Created August 26, 2019 15:22
split() regular expression in python
import re
s = "HELLO there HOW are YOU"
l = re.compile("(?<!^)\s+(?=[A-Z])(?!.\s)").split(s)
print l
Output:
['HELLO there', 'HOW are', 'YOU']