Skip to content

Instantly share code, notes, and snippets.

@pybokeh
Created June 29, 2018 19:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pybokeh/4b2f06df5afdcb74d471258a2f57a049 to your computer and use it in GitHub Desktop.
Save pybokeh/4b2f06df5afdcb74d471258a2f57a049 to your computer and use it in GitHub Desktop.
web_scraping/Untitled.ipynb
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"metadata": {
"trusted": true
},
"cell_type": "code",
"source": "from bs4 import BeautifulSoup # html/lxml parsing library\nfrom collections import OrderedDict # data structure to hold vehicle data\nimport urllib.request as request # library to connect to url resource\nimport re # regular expressions library for pattern matching",
"execution_count": 1,
"outputs": []
},
{
"metadata": {
"trusted": true
},
"cell_type": "code",
"source": "url = 'https://www.carcomplaints.com/Acura/TLX/2015/transmission/jerks_between_gears.shtml'\n\nhtml = request.urlopen(url)\nsoup = BeautifulSoup(html, 'lxml')",
"execution_count": 2,
"outputs": []
},
{
"metadata": {
"trusted": true
},
"cell_type": "code",
"source": "num_pages = int(soup.find_all('meta', attrs={'name': 'description'})[0]['content'].split('Page 1 of ')[1].replace(\")\", \"\"))",
"execution_count": 212,
"outputs": []
},
{
"metadata": {
"trusted": true
},
"cell_type": "code",
"source": "num_pages`",
"execution_count": 213,
"outputs": [
{
"output_type": "execute_result",
"execution_count": 213,
"data": {
"text/plain": "3"
},
"metadata": {}
}
]
},
{
"metadata": {
"trusted": true
},
"cell_type": "code",
"source": "for page in range(num_pages):\n print(page)",
"execution_count": 214,
"outputs": [
{
"output_type": "stream",
"text": "0\n1\n2\n",
"name": "stdout"
}
]
},
{
"metadata": {
"trusted": true
},
"cell_type": "code",
"source": "for page in range()",
"execution_count": null,
"outputs": []
},
{
"metadata": {
"trusted": true
},
"cell_type": "code",
"source": "reviews = soup.find_all('div', 'comments')",
"execution_count": 106,
"outputs": []
},
{
"metadata": {
"trusted": true
},
"cell_type": "code",
"source": "for review in reviews:\n for ps in review.find_all('p'):\n print(ps.getText())\n if ps.getText().__contains__(', US'):\n print(\"##############################################################################################################\")",
"execution_count": 163,
"outputs": [
{
"output_type": "stream",
"text": "A D V E R T I S E M E N T S\nWhen traveling under 20 mph, the vehicle downshifts dramatically causing a slight jerking motion.\n\n\t\t\t\t- Albert M.,\n\t\t\t\tColton, US\n\n##############################################################################################################\nJust got my 2015 TLX in December. After a month of driving I noticed (mostly when it's cold) it slams into gear when accelerating and slams when slowing down. It felt like someone rear ended me the first few times. I saw many other people had the same issue and was wondering if I should get it looked at. Not sure who to go to since it seems Acura isn't doing anything about it. I loved my 2005 TL but transmission left me on the side of the highway (@135000) don't want the same thing happening with this car. Besides this problem I love the car.\n\n\t\t\t\t- Samantha V.,\n\t\t\t\tWest Roxbury, US\n\n##############################################################################################################\nThe main problem is jerkiness between 2-3 and 3-4 gears. Also, the throttle response is really bad. You have to practically floor the gas pedal to get a real response.\n\n\t\t\t\t- Tony F.,\n\t\t\t\tFrederick, MD, US\n\n##############################################################################################################\nA D V E R T I S E M E N T S\nHaving the same issues as everyone here is reporting with jerkiness and shifting on the 2015 TLX V6 with the Z9 transmission. I brought it in 4 times to the dealer and the first three times they did something related to a TSB that was issued without being able to solve the problem. Went back in the 4th time and the dealership unplugged the VCM (variable cylinder control module) and had me take it for a test drive and it corrected the issue. I was told that this is how they were designed and that there was nothing else that they could do to fix the issue. Beyond frustrated at this point and now looking to engage an attorney that can help me through the lemon law arbitration process unless Acura Client Relations can make a deal on a trade up to an MDX or RDX without the same issue. Good luck to everyone else that has the same problem!\n\n\t\t\t\t- bucklib,\n\t\t\t\tMinneapolis, US\n\n##############################################################################################################\nTransmission is horrible. It's very jerky and jolts you all the time. Car lurches, hesitates, will dip rpms at times too. Worst transmission ever and the dealership/company will do absolutely NOTHING about this well known problem with the '15 TLX V6. Ruins this (very nice) whole car. Will NEVER buy another Honda/Acura product as I can't trust they'll fix extremely aggravating problems with their customers' cars.\n\n\t\t\t\t- Rachel S.,\n\t\t\t\tManchester, MO, USA\n\n##############################################################################################################\nThis car cost me over $43000 and I expect a smooth ride, not jerky ride. The dealer updates the SW. No use. Still the same. The dealer is well aware of the issue. Acura is doing nothing toward fixing the problem. I'm paranoid driving this car; There is no way the car shift gear 1st to 2nd without me feeling the jerk. I know it's coming. If Acura can not fix the issue, I'm selling my 2015 and NO MORE ACURA or Honda for ME.\nMY 2002 Acura TL S-type shifting gears so smoothly comparing to 2015. Hope Acura take this matter seriously and fix the transmission problem\nThanks,\nBasil\n\n\t\t\t\t- Basil I.,\n\t\t\t\tAnaheim, CA, US\n\n##############################################################################################################\nA D V E R T I S E M E N T S\nFrom the moment I bought this piece of junk the transmission has been jerking going in & out of second gear. Numerous passengers in my car have pointed out to me that my \"transmission is failing\", as if I don't know. My mother once thought we'd been rear ended after a particularly bad thud. I wish in the least that Acura would step up to the plate and resolve this issue for those of us stuck driving their crap cars. Their response has been to tell people to wait and maybe they'll be fixed later. They used to make fantastic cars, but when they started building them in the US the quality went to pot.\n\n\t\t\t\t- Althea D.,\n\t\t\t\tFort Lauderdale, US\n\n##############################################################################################################\nApparently I'm not alone with this problem. Rough shift esp. 1-2 and 2-3. Has been to the dealer many times, has had software updates to no avail. Dealer has consulted with Acura again to no avail.\nMy impression is that the problem is only with the ZF transmission in certain models. Dealer says that replacing the transmission won't help as the problem occurs in them all. (I think the dealer is frustrated too). We have had Acuras since the brand was initiated and Many Honda's before that.\nThis is the first car (of any brand) I have ever had that I have regretted buying. Acura customer service does not respond to my calls or e-mails. With good reason ,I suppose, since they are probably tired of hearing me complain.\n\n\t\t\t\t- stasmdfl,\n\t\t\t\tBradenton, FL, USA\n\n##############################################################################################################\nThe transmission jerks and hesitates between gears, especially after driving the car for more than 5/10 minutes. It doesn't do it all the time, but enough to drive a you crazy and occasionally make driving a challenge. I have been back to Acura 5 times and they have done the software updates and say they changed the transmission. Nothing has changed. I met with the regional rep who informed me that is how high gear transmissions shift because of all the gears. My previous car was an 8 speed auto and never, ever did this. Then he said the transmission was designed this way to meet government economy rates. You are kidding me? I felt like I got the complaint run-around and my only solution is arbitration. \nI also have issues with a grinding/minimal but present vibration in the steering wheel/gas pedal at 1500 RPMs. I will report on this separately.\nI am highly annoyed and disappointed with Acura and Honda - one of my reasons for getting the car was for Honda reliability.\n\n\t\t\t\t- Mike K.,\n\t\t\t\tFalls Church, VA, US\n\n##############################################################################################################\nSame issue as everybody else transmission is a mystery and jerks from 1 to 2nd and 2nd to 3rd. Took the car to the dealer twice. They admit the issue. Better now after the second attempt, however don't consider it resolved yet. Had a TL 2012, no problems with it. Very disappointed on this issue, however experience with the dealer has been exceptional. They are concerned and trying to resolve the issue. Perhaps the last time owning an Acura though as this is a over 45K car here in Canada, therefore not acceptable in my opinion.\n\n\t\t\t\t- feliper,\n\t\t\t\tOttawa, ON, Canada\n\nA D V E R T I S E M E N T S\nMisery loves company... sorry!\nI see the same complaints with the transmission jerking... one time I thought I ran over something as I heard a dull thud but it was the transmission going from 2nd to 3rd. I also noted that the car may speed up when you brake or use the paddle shifters. When I put the car in park, it surges forward and then back... unnerving. I won't let my wife drive it as I worry about her safety. \nThis is my 4th Acura... I've been a loyal Honda customer for years having owned 4 Hondas as well. How does a company with a history of dependability and reliability like Honda release a product like this!!! I'm very disappointed with what should be a very good car... All my Acura's were wonderful cars. I traded in my 2006 TL for this car and now I wonder.\nI hate buying and selling cars so I will live with it and hope that someday Acura does something but I have little faith in this. I have modified my driving to anticipate the thunks of the transmission by lowering my speed between shifts but that's no solution. What a horrible shame to see Acura put out a substandard product.\n\n\t\t\t\t- Jim B.,\n\t\t\t\tFlower Mound, TX, USA\n\n##############################################################################################################\nI see everyone is having the same shifting problem, I never thought such a thing would be possible from my favorite car brand. I was given a similar TLX loaner at the dealership with the only difference being that it was a 4 cyl and it drove perfectly, no shifting problems at all. Dealership told me mine had to do with the V6 computer trying to save gas. I'm not a car expert but I've been driving a long time and I'm not stupid...\nThis is my third Acura and the other two were wonderful-I drove them many years with absolutely no problems. I love all the features on my TLX, but because of the shifting issues I'm afraid this may be my last Acura.\n\n\t\t\t\t- dx2,\n\t\t\t\tMobile, AL, USA\n\n##############################################################################################################\nWe have been loyal Acura customers for over 14 years; we recently splurged and bought a new 2015 SH-AWD TECH TLX. We are very frustrated and annoyed at how this car drives. There is a definite jerk and hesitation between the lower gears (1 to 2; 2 to 3). In addition, the car occasionally accelerates when coasting to a stop, very unnerving! We are disappointed and saddened that Acura would put out a car of this substandard caliber. It is discouraging that this problem continues...the 2015 TLX has been out on the market for more than a year and Acura has not corrected these recognized problems. We have brought the car into the dealership for \"software updates\" but the jerky shifting/hesitation/acceleration problems continue. We are looking into pursuing the Lemon Law....\n\n\t\t\t\t- Judy P.,\n\t\t\t\tWoodinville, WA, USA\n\n##############################################################################################################\nMy experience has been very similar to the others I have read. I have the issue of jerky shifting and sudden acceleration while braking. As others have reported, I took the car in to the dealer and they said that nothing was wrong. They even told me \"they couldn't reproduce the symptoms\" and that there was nothing that could be done. They did acknowledge that it was a common complaint and tried to say it was attributed to the transmission \"learning process,\" which I highly doubt is accurate.\nI have had good luck with the Acura brand that this is the fourth one I've owned and have loved all the previous. I've had the car for a few months and I'm ready to trade it in for an Audi. I couldn't be more disappointed.\n\n\t\t\t\t- Jason W.,\n\t\t\t\tValley Park, MO, USA\n\n##############################################################################################################\nI bought my V6 FWD Acura TLX from Acura of Pleasanton in California. Like others I too have the issue of jerky shifting and sudden acceleration while braking. I took the car in to the dealer and they said that nothing was wrong, and that there was nothing to address. So I strongly suggest that nobody purchase a TLX form this dealership as they do not stand behind their product.\nI'm so deeply disappointed that Acura is denying that there is an obvious defect in the design of the TLX. This was the first Acura I've ever owned, and it will certainly be the last. \nI also subscribe to Consumer reports magazine, and they are giving the car a terrible rating for reliability based on this transmission issue. Personally I hope a class action lawsuit gets under way as this level of incompetence and dangerously bad engineering needs to be addressed.\n\n\t\t\t\t- Jesse T.,\n\t\t\t\tDublin, CA, USA\n\n##############################################################################################################\nThe gear jerks in second gear it's awful \nI owned acura before never had any issues \nI can't believe a brand new car will be Jerking between gears\n\n\t\t\t\t- Faisal M.,\n\t\t\t\tcalgary, AB, Canada\n\nYes, you guys are on point! I had my 2015 TLX V4 Advanced Pack and every single complaint I read on here I have! This is very nerve wrecking! I took in my Acura two weeks ago to Sherman Oaks Center Acura, where I originally purchased the vehicle, and explained everything that I was experiencing; e.i. Jerks, sudden revs, delayed upshift/downshift. The Repair Center personnel advised me that the vehicle just needed a \"simple Software Update\" and that not to be alarmed because Acura will have future updates. So when I went to pick up my car I noticed that the car felt as though I was driving my girlfriend's 10 year old Corolla. \nThe car is a F** piece of S** I tell you! It lags more and vibrates too much! Can Anyone help me Lemon this car?!!! Or how to follow the Lemon Procedures!\n\n\t\t\t\t- sillase89,\n\t\t\t\tLos Angeles, CA, USA\n\n##############################################################################################################\nWow, a beautiful car with a real bad problem. It is delays in the lower gears transition. Significant to the degree that all the passengers noticed it. Also, when coming to a stop there is an uptick in the gear rather than a slowing down. In Eco mode, the problem is not notable, but is there.\nMy first Acura, and my first problem. Jesus! It is true that there is a class action suite already?\n\n\t\t\t\t- del río,\n\t\t\t\tCarolina, Puerto Rico\n\nWow, totally unhappy with this car already only 3 days ownership -- it has definite jerks and definite delays in the lower gears. Significant to the degree that the passenger noticed it. Also when coming to a stop there seems to be an uptick in the gear rather than a slowing down -- also somewhat dangerous in my mind. \nTwice when I parked there was a NOTICEABLE jerk of the entire car. \nNot a complainer -- had a Acura Tl for 11 years --NEVER had a problem and this is BIG for me. \nPlease give some thoughts about how to proceed -- Are people going to do a class action suite? Will demand the manager of the dealer ride with me to evaluate.\n\n\t\t\t\t- samiam007,\n\t\t\t\tMoraga, CA, USA\n\n##############################################################################################################\nAs reported by many others, our brand new TLX V6 AWD jerked from day 1 when it shifted somewhat between gears 1 and 2 and distinctly between gears 2 and 3. We had the software update done for the transmission in September, and it was far worse. After taking the car back and complaining about the problem, the dealer reran the learning procedure and there was some improvement. It still was nowhere near smooth. We took it back a second time and were told that it was \"operating as designed.\" It was also pointed out that we did not buy the car at that particular dealership, as if that matters. We have had the car back to the dealership where we purchased the car, and they made an effort to solve the problem but admitted that they realized it was not smooth. We were invited to meet with a district representative to discuss the problem. She rode in the vehicle and said she felt what we were talking about but explained that is how this model of car drives. We drove another vehicle of the same model from the lot and she accused my husband of driving the car differently so that it did not shift in the same way as ours. She refused to replace the transmission as we requested and also refused to give us the contacts for her superior. She basically said that there is no fix for the problem. How does a company get to admit that a product is defective but refuse to do anything about it? We are continuing to work with the dealership where we purchased this defective vehicle to come to an acceptable resolution. We would love to get rid of this piece of junk. No vehicle in this price range should drive like this. It is unsafe to pull out into traffic not knowing how much it will hesitate and jerk in the shifting process. This is our first Acura and will be our last! Acura needs to own up to their error and make it right!\n\n\t\t\t\t- kunk361,\n\t\t\t\tCamp Hill, PA, USA\n\n##############################################################################################################\n",
"name": "stdout"
}
]
},
{
"metadata": {
"trusted": true
},
"cell_type": "code",
"source": "len(reviews[5].find_all('p'))",
"execution_count": 83,
"outputs": [
{
"output_type": "execute_result",
"execution_count": 83,
"data": {
"text/plain": "5"
},
"metadata": {}
}
]
},
{
"metadata": {
"trusted": true
},
"cell_type": "code",
"source": "reviews[6].find_all('p')[0].getText()",
"execution_count": 82,
"outputs": [
{
"output_type": "execute_result",
"execution_count": 82,
"data": {
"text/plain": "'A D V E R T I S E M E N T S'"
},
"metadata": {}
}
]
},
{
"metadata": {
"trusted": true
},
"cell_type": "code",
"source": "reviews[5].find_all('p')[4].getText()",
"execution_count": 89,
"outputs": [
{
"output_type": "execute_result",
"execution_count": 89,
"data": {
"text/plain": "'\\n\\t\\t\\t\\t- Basil I.,\\n\\t\\t\\t\\tAnaheim, CA, US\\n'"
},
"metadata": {}
}
]
},
{
"metadata": {
"trusted": true
},
"cell_type": "code",
"source": "for review in reviews:\n type(review)",
"execution_count": 95,
"outputs": []
}
],
"metadata": {
"kernelspec": {
"name": "python3",
"display_name": "Python 3",
"language": "python"
},
"hide_input": false,
"language_info": {
"name": "python",
"version": "3.6.3",
"mimetype": "text/x-python",
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"pygments_lexer": "ipython3",
"nbconvert_exporter": "python",
"file_extension": ".py"
},
"gist": {
"id": "",
"data": {
"description": "web_scraping/Untitled.ipynb",
"public": true
}
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment