python-semrush
python-semrush copied to clipboard
Python wrapper around the SEMrush API.
I was trying to deploy an app with Streamlit, but I was having some errors with the requests library conflicts. The error I was getting was: Streamlit 1.27.0 depends on...
AttributeError: 'SemrushClient' object has no attribute 'traffic_summary'
There's an issue with parsing returned data with URLs that include a semicolon: From [/python_semrush/semrush.py](https://github.com/storerjeremy/python-semrush/blob/master/python_semrush/semrush.py) ```python 84 result = {} 85 for i, datum in enumerate(line.split(';')): ---> 86 result[columns[i]] =...
### Here: https://github.com/storerjeremy/python-semrush/blob/4dfd72d82185784180f739e219082c444c08b640/python_semrush/semrush.py#L79 ### Change to: ``` lines = data.splitlines() ``` ### Here: https://github.com/storerjeremy/python-semrush/blob/4dfd72d82185784180f739e219082c444c08b640/python_semrush/semrush.py#L67 ### Add: ``` if 'export_columns' in kwargs: kwargs['export_columns'] = ",".join([c.strip() for c in kwargs['export_columns'].split(',')]) ```
This repo, uses the requests library to hit the api URL and manage parameters. One issue with this is that when using display_filter, the api expects: `+|Ur|Co|electrical-supplies` (include|URL|Containing|electrical-supplies) to be:...