This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
def get_filepaths(directory): | |
file_paths = [] # List which will store all of the full filepaths. | |
# Walk the tree. | |
for root, directories, files in os.walk(directory): | |
for filename in files: | |
# Join the two strings in order to form the full filepath. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from requests_html import HTMLSession | |
session = HTMLSession() | |
url = "https://www.imdb.com/chart/top/?ref_=nv_mv_250" | |
response = session.get(url) | |
titles_es=response.html.find('.titleColumn') | |
for movie_title in titles_es: | |
print(movie_title.text) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# author AlixaProDev | |
import glob | |
# path of the current directory | |
path = './' | |
curfiles = glob.glob(path + '**/*.py',recursive=True) | |
for file in curfiles: | |
print(file) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
@author : alixaprodev.com | |
''' | |
from tkinter import * | |
import datetime | |
import time | |
import winsound | |
from threading import * | |
root = Tk() | |
root.geometry("400x200") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import urllib.request | |
import time | |
from bs4 import BeautifulSoup | |
url = 'https://www.amazon.com/s?k=python+books&ref=nb_sb_noss_2' | |
response = requests.get(url) | |
htmldata = BeautifulSoup(response.text, "html.parser") | |
print(htmldata) | |
h4tags=htmldata.findall('h4') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import urllib.request | |
import time | |
from bs4 import BeautifulSoup | |
url = 'https://www.amazon.com/s?k=python+books&ref=nb_sb_noss_2' | |
response = requests.get(url) | |
htmldata = BeautifulSoup(response.text, "html.parser") | |
print(htmldata) |