py4pa.misc¶
- py4pa.misc.csv_to_utf8(file)¶
Converts a csv file to utf-8 encoding
- Parameters:
file (String) – Path to file to be encoded
- Returns:
String of path to reformatted file
- Return type:
fName
- py4pa.misc.getNowDateTimeStr(time=True)¶
Function to generate a Date/Time stamp for the current time
- Parameters:
time (Boolean) – Set to True to include time in Date stamp. False returns just date. Defaults to True.
- Returns:
String of date-time stamp
- Return type:
stamp
- py4pa.misc.get_random_useragent(browser=None)¶
Function to generate a random user agent for web scraping
- Parameters:
browser (String) – Valid values are: ‘ie’, ‘opera’, ‘chrome’, ‘firefox’, ‘safari’
- Return type:
String of valid User Agent